public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* FAIL: gcc.c-torture/compile/20000804-1.c  -O0  with PIC on  gcc-4_4-branch
@ 2009-07-12 19:41 Jack Howarth
  2009-07-12 19:55 ` Richard Guenther
  0 siblings, 1 reply; 8+ messages in thread
From: Jack Howarth @ 2009-07-12 19:41 UTC (permalink / raw)
  To: gcc

   I am seeing a new failure on x86_64-apple-darwin10 in current gcc 4.4 branch
that wasn't present in the gcc 4.4.0 release. At -m32, the testsuite failure...

FAIL: gcc.c-torture/compile/20000804-1.c  -O0  (test for excess errors)

appears with the error logged as...

Executing on host: /sw/src/fink.build/gcc44-4.4.099-20090711/darwin_objdir/gcc/xgcc -B/sw/src/fink.build/gcc44-4.4.099-20090711/darwin_objdir/gcc/   -O3 -fomit-frame-pointer  ...skipping...
Executing on host: /sw/src/fink.build/gcc44-4.4.099-20090711/darwin_objdir/gcc/xgcc -B/sw/src/fink.build/gcc44-4.4.099-20090711/darwin_objdir/gcc/   -O0  -w -c  -m32 -o 20000804-1.o /sw/src/fink.build/gcc44-4.4.099-20090711/gcc-4.4-20090711/gcc/testsuite/gcc.c-torture/compile/20000804-1.c    (timeout = 300)
/sw/src/fink.build/gcc44-4.4.099-20090711/gcc-4.4-20090711/gcc/testsuite/gcc.c-torture/compile/20000804-1.c: In function 'f':
/sw/src/fink.build/gcc44-4.4.099-20090711/gcc-4.4-20090711/gcc/testsuite/gcc.c-torture/compile/20000804-1.c:16: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
/sw/src/fink.build/gcc44-4.4.099-20090711/gcc-4.4-20090711/gcc/testsuite/gcc.c-torture/compile/20000804-1.c:16: error: 'asm' operand has impossible constraints
compiler exited with status 1
output is:
/sw/src/fink.build/gcc44-4.4.099-20090711/gcc-4.4-20090711/gcc/testsuite/gcc.c-torture/compile/20000804-1.c: In function 'f':
/sw/src/fink.build/gcc44-4.4.099-20090711/gcc-4.4-20090711/gcc/testsuite/gcc.c-torture/compile/20000804-1.c:16: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
/sw/src/fink.build/gcc44-4.4.099-20090711/gcc-4.4-20090711/gcc/testsuite/gcc.c-torture/compile/20000804-1.c:16: error: 'asm' operand has impossible constraints

FAIL: gcc.c-torture/compile/20000804-1.c  -O0  (test for excess errors)
Excess errors:
/sw/src/fink.build/gcc44-4.4.099-20090711/gcc-4.4-20090711/gcc/testsuite/gcc.c-torture/compile/20000804-1.c:16: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
/sw/src/fink.build/gcc44-4.4.099-20090711/gcc-4.4-20090711/gcc/testsuite/gcc.c-torture/compile/20000804-1.c:16: error: 'asm' operand has impossible constraints

The failure doesn't occur at -m32 if I pass -fno-PIC on the compilation line. Could someone with current gcc 4.4 branch
on x86_64-*-linux check to see if they get the same failure with -m32 -fPIC at -O0 for gcc.c-torture/compile/20000804-1.c?
This looks like a regression from gcc 4.4.0.
             Jack

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: FAIL: gcc.c-torture/compile/20000804-1.c -O0 with PIC on   gcc-4_4-branch
  2009-07-12 19:41 FAIL: gcc.c-torture/compile/20000804-1.c -O0 with PIC on gcc-4_4-branch Jack Howarth
@ 2009-07-12 19:55 ` Richard Guenther
  2009-07-12 20:25   ` Jack Howarth
  2009-07-13  0:40   ` Dave Korn
  0 siblings, 2 replies; 8+ messages in thread
From: Richard Guenther @ 2009-07-12 19:55 UTC (permalink / raw)
  To: Jack Howarth; +Cc: gcc

On Sun, Jul 12, 2009 at 9:41 PM, Jack Howarth<howarth@bromo.med.uc.edu> wrote:
>   I am seeing a new failure on x86_64-apple-darwin10 in current gcc 4.4 branch
> that wasn't present in the gcc 4.4.0 release. At -m32, the testsuite failure...
>
> FAIL: gcc.c-torture/compile/20000804-1.c  -O0  (test for excess errors)
>
> appears with the error logged as...
>
> Executing on host: /sw/src/fink.build/gcc44-4.4.099-20090711/darwin_objdir/gcc/xgcc -B/sw/src/fink.build/gcc44-4.4.099-20090711/darwin_objdir/gcc/   -O3 -fomit-frame-pointer  ...skipping...
> Executing on host: /sw/src/fink.build/gcc44-4.4.099-20090711/darwin_objdir/gcc/xgcc -B/sw/src/fink.build/gcc44-4.4.099-20090711/darwin_objdir/gcc/   -O0  -w -c  -m32 -o 20000804-1.o /sw/src/fink.build/gcc44-4.4.099-20090711/gcc-4.4-20090711/gcc/testsuite/gcc.c-torture/compile/20000804-1.c    (timeout = 300)
> /sw/src/fink.build/gcc44-4.4.099-20090711/gcc-4.4-20090711/gcc/testsuite/gcc.c-torture/compile/20000804-1.c: In function 'f':
> /sw/src/fink.build/gcc44-4.4.099-20090711/gcc-4.4-20090711/gcc/testsuite/gcc.c-torture/compile/20000804-1.c:16: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
> /sw/src/fink.build/gcc44-4.4.099-20090711/gcc-4.4-20090711/gcc/testsuite/gcc.c-torture/compile/20000804-1.c:16: error: 'asm' operand has impossible constraints
> compiler exited with status 1
> output is:
> /sw/src/fink.build/gcc44-4.4.099-20090711/gcc-4.4-20090711/gcc/testsuite/gcc.c-torture/compile/20000804-1.c: In function 'f':
> /sw/src/fink.build/gcc44-4.4.099-20090711/gcc-4.4-20090711/gcc/testsuite/gcc.c-torture/compile/20000804-1.c:16: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
> /sw/src/fink.build/gcc44-4.4.099-20090711/gcc-4.4-20090711/gcc/testsuite/gcc.c-torture/compile/20000804-1.c:16: error: 'asm' operand has impossible constraints
>
> FAIL: gcc.c-torture/compile/20000804-1.c  -O0  (test for excess errors)
> Excess errors:
> /sw/src/fink.build/gcc44-4.4.099-20090711/gcc-4.4-20090711/gcc/testsuite/gcc.c-torture/compile/20000804-1.c:16: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
> /sw/src/fink.build/gcc44-4.4.099-20090711/gcc-4.4-20090711/gcc/testsuite/gcc.c-torture/compile/20000804-1.c:16: error: 'asm' operand has impossible constraints
>
> The failure doesn't occur at -m32 if I pass -fno-PIC on the compilation line. Could someone with current gcc 4.4 branch
> on x86_64-*-linux check to see if they get the same failure with -m32 -fPIC at -O0 for gcc.c-torture/compile/20000804-1.c?
> This looks like a regression from gcc 4.4.0.

Please file a bugreport about this.  Can you constrain the revisions where
the regression was introduced?

Thanks,
Richard.

>             Jack
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: FAIL: gcc.c-torture/compile/20000804-1.c -O0 with PIC on  gcc-4_4-branch
  2009-07-12 19:55 ` Richard Guenther
@ 2009-07-12 20:25   ` Jack Howarth
  2009-07-13  0:40   ` Dave Korn
  1 sibling, 0 replies; 8+ messages in thread
From: Jack Howarth @ 2009-07-12 20:25 UTC (permalink / raw)
  To: Richard Guenther; +Cc: gcc

On Sun, Jul 12, 2009 at 09:55:13PM +0200, Richard Guenther wrote:
> On Sun, Jul 12, 2009 at 9:41 PM, Jack Howarth<howarth@bromo.med.uc.edu> wrote:
> >   I am seeing a new failure on x86_64-apple-darwin10 in current gcc 4.4 branch
> > that wasn't present in the gcc 4.4.0 release. At -m32, the testsuite failure...
> >
> > FAIL: gcc.c-torture/compile/20000804-1.c  -O0  (test for excess errors)
> >
> > appears with the error logged as...
> >
> > Executing on host: /sw/src/fink.build/gcc44-4.4.099-20090711/darwin_objdir/gcc/xgcc -B/sw/src/fink.build/gcc44-4.4.099-20090711/darwin_objdir/gcc/   -O3 -fomit-frame-pointer  ...skipping...
> > Executing on host: /sw/src/fink.build/gcc44-4.4.099-20090711/darwin_objdir/gcc/xgcc -B/sw/src/fink.build/gcc44-4.4.099-20090711/darwin_objdir/gcc/   -O0  -w -c  -m32 -o 20000804-1.o /sw/src/fink.build/gcc44-4.4.099-20090711/gcc-4.4-20090711/gcc/testsuite/gcc.c-torture/compile/20000804-1.c    (timeout = 300)
> > /sw/src/fink.build/gcc44-4.4.099-20090711/gcc-4.4-20090711/gcc/testsuite/gcc.c-torture/compile/20000804-1.c: In function 'f':
> > /sw/src/fink.build/gcc44-4.4.099-20090711/gcc-4.4-20090711/gcc/testsuite/gcc.c-torture/compile/20000804-1.c:16: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
> > /sw/src/fink.build/gcc44-4.4.099-20090711/gcc-4.4-20090711/gcc/testsuite/gcc.c-torture/compile/20000804-1.c:16: error: 'asm' operand has impossible constraints
> > compiler exited with status 1
> > output is:
> > /sw/src/fink.build/gcc44-4.4.099-20090711/gcc-4.4-20090711/gcc/testsuite/gcc.c-torture/compile/20000804-1.c: In function 'f':
> > /sw/src/fink.build/gcc44-4.4.099-20090711/gcc-4.4-20090711/gcc/testsuite/gcc.c-torture/compile/20000804-1.c:16: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
> > /sw/src/fink.build/gcc44-4.4.099-20090711/gcc-4.4-20090711/gcc/testsuite/gcc.c-torture/compile/20000804-1.c:16: error: 'asm' operand has impossible constraints
> >
> > FAIL: gcc.c-torture/compile/20000804-1.c  -O0  (test for excess errors)
> > Excess errors:
> > /sw/src/fink.build/gcc44-4.4.099-20090711/gcc-4.4-20090711/gcc/testsuite/gcc.c-torture/compile/20000804-1.c:16: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
> > /sw/src/fink.build/gcc44-4.4.099-20090711/gcc-4.4-20090711/gcc/testsuite/gcc.c-torture/compile/20000804-1.c:16: error: 'asm' operand has impossible constraints
> >
> > The failure doesn't occur at -m32 if I pass -fno-PIC on the compilation line. Could someone with current gcc 4.4 branch
> > on x86_64-*-linux check to see if they get the same failure with -m32 -fPIC at -O0 for gcc.c-torture/compile/20000804-1.c?
> > This looks like a regression from gcc 4.4.0.
> 
> Please file a bugreport about this.  Can you constrain the revisions where
> the regression was introduced?
> 
> Thanks,
> Richard.
> 
> >             Jack
> >

   A correction. I do see this in gcc 4.4.0 as well on both the x86_64-apple-darwin9 and
the x86_64-apple-darwin10 targets so it isn't a regression in gcc 4.4 branch. However it
is still probably worth looking at since -fPIC doesn't get tested as often on linux.
Interestingly, Apple's gcc-4.0 and gcc-4.2 compilers produce a similar error message when
compiling the testcase against Xcode 3.1.3 under Darwin9...

gcc-4.2  -O0 -w -c -m32 -o 20000804-1.o 20000804-1.c
20000804-1.c: In function ‘f’:
20000804-1.c:16: error: can't find a register in class ‘GENERAL_REGS’ while reloading ‘asm’
20000804-1.c:16: error: ‘asm’ operand has impossible constraints

and no assembly is generated with -save-temps.
                       Jack

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: FAIL: gcc.c-torture/compile/20000804-1.c -O0 with PIC on   gcc-4_4-branch
  2009-07-12 19:55 ` Richard Guenther
  2009-07-12 20:25   ` Jack Howarth
@ 2009-07-13  0:40   ` Dave Korn
  2009-07-13  3:39     ` Jack Howarth
  1 sibling, 1 reply; 8+ messages in thread
From: Dave Korn @ 2009-07-13  0:40 UTC (permalink / raw)
  To: Richard Guenther; +Cc: Jack Howarth, gcc

Richard Guenther wrote:
> On Sun, Jul 12, 2009 at 9:41 PM, Jack Howarth<howarth@bromo.med.uc.edu> wrote:
>>   I am seeing a new failure on x86_64-apple-darwin10 in current gcc 4.4 branch
>> that wasn't present in the gcc 4.4.0 release. At -m32, the testsuite failure...
>>
>> FAIL: gcc.c-torture/compile/20000804-1.c  -O0  (test for excess errors)

  Do you know what this test is supposed to be doing?

> $ cat /gnu/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/20000804-1.c
> /* This does not work on m68hc11 or h8300 due to the use of an asm
>    statement to force a 'long long' (64-bits) to go in a register.  */
> /* { dg-do assemble } */
> /* { dg-skip-if "" { { i?86-*-* x86_64-*-* } && ilp32 } { "-fpic" "-fPIC" } { ""
>  } } */
> /* { dg-skip-if "PIC default" { i?86-*-darwin* } { "*" } { "" } } */
> /* { dg-skip-if "No 64-bit registers" { m32c-*-* } { "*" } { "" } } */
> /* { dg-xfail-if "" { m6811-*-* m6812-*-* h8300-*-* } { "*" } { "" } } */
> 
> /* Copyright (C) 2000, 2003 Free Software Foundation */
> __complex__ long long f ()
> {
>   int i[99];
>   __complex__ long long v;
> 
>   v += f ();

  Undefined behaviour, no?

    cheers,
      DaveK

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: FAIL: gcc.c-torture/compile/20000804-1.c -O0 with PIC on  gcc-4_4-branch
  2009-07-13  0:40   ` Dave Korn
@ 2009-07-13  3:39     ` Jack Howarth
  2009-07-13  7:32       ` Richard Guenther
  0 siblings, 1 reply; 8+ messages in thread
From: Jack Howarth @ 2009-07-13  3:39 UTC (permalink / raw)
  To: Dave Korn; +Cc: Richard Guenther, gcc

On Mon, Jul 13, 2009 at 01:52:51AM +0100, Dave Korn wrote:
> Richard Guenther wrote:
> > On Sun, Jul 12, 2009 at 9:41 PM, Jack Howarth<howarth@bromo.med.uc.edu> wrote:
> >>   I am seeing a new failure on x86_64-apple-darwin10 in current gcc 4.4 branch
> >> that wasn't present in the gcc 4.4.0 release. At -m32, the testsuite failure...
> >>
> >> FAIL: gcc.c-torture/compile/20000804-1.c  -O0  (test for excess errors)
> 
>   Do you know what this test is supposed to be doing?
> 
> > $ cat /gnu/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/20000804-1.c
> > /* This does not work on m68hc11 or h8300 due to the use of an asm
> >    statement to force a 'long long' (64-bits) to go in a register.  */
> > /* { dg-do assemble } */
> > /* { dg-skip-if "" { { i?86-*-* x86_64-*-* } && ilp32 } { "-fpic" "-fPIC" } { ""
> >  } } */
> > /* { dg-skip-if "PIC default" { i?86-*-darwin* } { "*" } { "" } } */
> > /* { dg-skip-if "No 64-bit registers" { m32c-*-* } { "*" } { "" } } */
> > /* { dg-xfail-if "" { m6811-*-* m6812-*-* h8300-*-* } { "*" } { "" } } */
> > 
> > /* Copyright (C) 2000, 2003 Free Software Foundation */
> > __complex__ long long f ()
> > {
> >   int i[99];
> >   __complex__ long long v;
> > 
> >   v += f ();
> 
>   Undefined behaviour, no?
> 
>     cheers,
>       DaveK

So then the testcase is flawed and should have the darwin line corrected to...

/* { dg-skip-if "PIC default" { { i?86-*-darwin* x86_64-*-darwin* } && ilp32 }  { "*" } { "" } } */



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: FAIL: gcc.c-torture/compile/20000804-1.c -O0 with PIC on   gcc-4_4-branch
  2009-07-13  3:39     ` Jack Howarth
@ 2009-07-13  7:32       ` Richard Guenther
  2009-07-13  8:18         ` Dave Korn
  0 siblings, 1 reply; 8+ messages in thread
From: Richard Guenther @ 2009-07-13  7:32 UTC (permalink / raw)
  To: Jack Howarth; +Cc: Dave Korn, gcc

On Mon, Jul 13, 2009 at 5:39 AM, Jack Howarth<howarth@bromo.med.uc.edu> wrote:
> On Mon, Jul 13, 2009 at 01:52:51AM +0100, Dave Korn wrote:
>> Richard Guenther wrote:
>> > On Sun, Jul 12, 2009 at 9:41 PM, Jack Howarth<howarth@bromo.med.uc.edu> wrote:
>> >>   I am seeing a new failure on x86_64-apple-darwin10 in current gcc 4.4 branch
>> >> that wasn't present in the gcc 4.4.0 release. At -m32, the testsuite failure...
>> >>
>> >> FAIL: gcc.c-torture/compile/20000804-1.c  -O0  (test for excess errors)
>>
>>   Do you know what this test is supposed to be doing?
>>
>> > $ cat /gnu/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/20000804-1.c
>> > /* This does not work on m68hc11 or h8300 due to the use of an asm
>> >    statement to force a 'long long' (64-bits) to go in a register.  */
>> > /* { dg-do assemble } */
>> > /* { dg-skip-if "" { { i?86-*-* x86_64-*-* } && ilp32 } { "-fpic" "-fPIC" } { ""
>> >  } } */
>> > /* { dg-skip-if "PIC default" { i?86-*-darwin* } { "*" } { "" } } */
>> > /* { dg-skip-if "No 64-bit registers" { m32c-*-* } { "*" } { "" } } */
>> > /* { dg-xfail-if "" { m6811-*-* m6812-*-* h8300-*-* } { "*" } { "" } } */
>> >
>> > /* Copyright (C) 2000, 2003 Free Software Foundation */
>> > __complex__ long long f ()
>> > {
>> >   int i[99];
>> >   __complex__ long long v;
>> >
>> >   v += f ();
>>
>>   Undefined behaviour, no?
>>
>>     cheers,
>>       DaveK
>
> So then the testcase is flawed and should have the darwin line corrected to...
>
> /* { dg-skip-if "PIC default" { { i?86-*-darwin* x86_64-*-darwin* } && ilp32 }  { "*" } { "" } } */

Probably yes.  The testcase invokes undefined behavior because
v is used uninitialized - but that may be the trigger for the original
ICE, so better preserve that.

Richard.

>
>
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: FAIL: gcc.c-torture/compile/20000804-1.c -O0 with PIC on gcc-4_4-branch
  2009-07-13  7:32       ` Richard Guenther
@ 2009-07-13  8:18         ` Dave Korn
  2009-07-13  8:23           ` Richard Guenther
  0 siblings, 1 reply; 8+ messages in thread
From: Dave Korn @ 2009-07-13  8:18 UTC (permalink / raw)
  To: Richard Guenther; +Cc: Jack Howarth, Dave Korn, gcc

Richard Guenther wrote:
> On Mon, Jul 13, 2009 at 5:39 AM, Jack Howarth<howarth@bromo.med.uc.edu> wrote:
>> On Mon, Jul 13, 2009 at 01:52:51AM +0100, Dave Korn wrote:

>>>> __complex__ long long f ()
>>>> {
>>>>   int i[99];
>>>>   __complex__ long long v;
>>>>
>>>>   v += f ();
>>>   Undefined behaviour, no?
>>>
>>>     cheers,
>>>       DaveK
>> So then the testcase is flawed and should have the darwin line corrected to...
>>
>> /* { dg-skip-if "PIC default" { { i?86-*-darwin* x86_64-*-darwin* } && ilp32 }  { "*" } { "" } } */
> 
> Probably yes.  The testcase invokes undefined behavior because
> v is used uninitialized - but that may be the trigger for the original
> ICE, so better preserve that.

  It would be useful as an experiment to try initialising it and see if that's
also what's triggering the reload failure in this particular case, because if
not then there's still a real bug to find on darwin.

    cheers,
      DaveK

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: FAIL: gcc.c-torture/compile/20000804-1.c -O0 with PIC on   gcc-4_4-branch
  2009-07-13  8:18         ` Dave Korn
@ 2009-07-13  8:23           ` Richard Guenther
  0 siblings, 0 replies; 8+ messages in thread
From: Richard Guenther @ 2009-07-13  8:23 UTC (permalink / raw)
  To: Dave Korn; +Cc: Jack Howarth, gcc

On Mon, Jul 13, 2009 at 10:31 AM, Dave
Korn<dave.korn.cygwin@googlemail.com> wrote:
> Richard Guenther wrote:
>> On Mon, Jul 13, 2009 at 5:39 AM, Jack Howarth<howarth@bromo.med.uc.edu> wrote:
>>> On Mon, Jul 13, 2009 at 01:52:51AM +0100, Dave Korn wrote:
>
>>>>> __complex__ long long f ()
>>>>> {
>>>>>   int i[99];
>>>>>   __complex__ long long v;
>>>>>
>>>>>   v += f ();
>>>>   Undefined behaviour, no?
>>>>
>>>>     cheers,
>>>>       DaveK
>>> So then the testcase is flawed and should have the darwin line corrected to...
>>>
>>> /* { dg-skip-if "PIC default" { { i?86-*-darwin* x86_64-*-darwin* } && ilp32 }  { "*" } { "" } } */
>>
>> Probably yes.  The testcase invokes undefined behavior because
>> v is used uninitialized - but that may be the trigger for the original
>> ICE, so better preserve that.
>
>  It would be useful as an experiment to try initialising it and see if that's
> also what's triggering the reload failure in this particular case, because if
> not then there's still a real bug to find on darwin.

I don't think so.  On 32bit

  asm("": "+r" (v) : "r" (0), "r" (1));

needs too many registers (4 for the v, 1 for constant 0 and 1 for
constant 1).  That's not possible with a frame-pointer and a PIC
register.

Richard.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-07-13  8:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-12 19:41 FAIL: gcc.c-torture/compile/20000804-1.c -O0 with PIC on gcc-4_4-branch Jack Howarth
2009-07-12 19:55 ` Richard Guenther
2009-07-12 20:25   ` Jack Howarth
2009-07-13  0:40   ` Dave Korn
2009-07-13  3:39     ` Jack Howarth
2009-07-13  7:32       ` Richard Guenther
2009-07-13  8:18         ` Dave Korn
2009-07-13  8:23           ` Richard Guenther

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).