[mercury-users] compilation problem, all, some

Peter Hawkins peter at hawkins.emu.id.au
Thu Jul 22 21:14:41 AEST 2004


Hi...
On Thu, Jul 22, 2004 at 07:16:25PM +1000, Zoltan Somogyi wrote:
> On 19-Jul-2004, Peter Hawkins <peter at hawkins.emu.id.au> wrote:
> > > float.c:1376: internal compiler error: in verify_wide_reg, at flow.c:555
> > > Please submit a full bug report,
> > > with preprocessed source if appropriate.
> > > See <URL:http://www.suse.de/feedback> for instructions.
> > > Preprocessed source stored into /tmp/cchH72n9.out file, please attach this to your bugreport.
> > 
> > I found and reported this a while ago. It's GCC PR14700:
> > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14700
> 
> Do you have a test case that we could add to configure.in to detect
> versions of gcc with this bug?

The following is the smallest test case I could derive from float.c that
triggers the bug (naturally it's i386 specific, but I would imagine a
similar bug exists for other architectures). I think you need an
optimization level of at least -O to trigger the bug.

Most versions of gcc 3.3 are buggy (it's fixed in the 3.3 CVS branch and
the debian unstable package, and probably in 3.4).

int MR_is_inf(double); 
 
register unsigned int MR_mr1 __asm__ ("edi"); 
register unsigned int MR_mr2 __asm__ ("ebx"); 
 
static void 
float_module21 (void) 
{ 
    (MR_mr2) = 0; 
        (MR_mr2) = MR_is_inf (0.0);  
     if (!(MR_mr2))  
         { 
            goto mercury__float__is_nan_or_inf_1_0_i7; 
         } 
 
      __asm__ __volatile__ ("/* " "mercury__float__is_nan_or_inf_1_0_i7" "*/\n");  
 
mercury__float__is_nan_or_inf_1_0_i7: 
        goto *(((void *) ((MR_mr1)))); 
   
}


On an unrelated note, is there any way to convince Mercury not to use 
cast expressions as lvalues? gcc 3.3 is feeding me lots of these
warnings:
Mercury/cs/test.c:1919: warning: use of cast expressions as
lvalues is deprecated

Apparently the cast-as-lvalue extension will go away shortly.

=)
Peter
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list