19275 – [3.4/4.0] gcc.dg/20020919-1.c fails with -fpic/-fPIC on i686-pc-linux-gnu (original) (raw)

Description Kaveh Ghazi 2005-01-05 19:25:26 UTC

I'm seeing a testsuite regression on 3.4 and mainline when running with extra flags -fpic or -fPIC. The testcase does use ebx, however 3.3 manages to pass so somehow it can work and this is a regression. (The testcase is identical in all three branches.)

http://gcc.gnu.org/ml/gcc-testresults/2005-01/msg00211.html http://gcc.gnu.org/ml/gcc-testresults/2005-01/msg00210.html http://gcc.gnu.org/ml/gcc-testresults/2005-01/msg00209.html

I get this in the log file: FAIL: gcc.dg/20020919-1.c (test for errors, line 132) FAIL: gcc.dg/20020919-1.c (test for errors, line 177) FAIL: gcc.dg/20020919-1.c (test for errors, line 231) FAIL: gcc.dg/20020919-1.c (test for errors, line 244) FAIL: gcc.dg/20020919-1.c (test for excess errors) Excess errors: gcc.dg/20020919-1.c:132: error: PIC register '%ebx' clobbered in 'asm' gcc.dg/20020919-1.c:177: error: PIC register '%ebx' clobbered in 'asm' gcc.dg/20020919-1.c:186: error: PIC register '%ebx' clobbered in 'asm' gcc.dg/20020919-1.c:231: error: PIC register '%ebx' clobbered in 'asm' gcc.dg/20020919-1.c:244: error: PIC register '%ebx' clobbered in 'asm'

Comment 1 Drea Pinski 2005-01-05 19:26:47 UTC

These should be just skiped with -fPIC.

Comment 2 Drea Pinski 2005-01-05 20:44:00 UTC

The error message is correct.

Comment 3 Kaveh Ghazi 2005-01-05 21:42:58 UTC

Is it a bug that 3.3 compiles it without a problem?

Comment 4 Drea Pinski 2005-01-05 21:57:15 UTC

(In reply to comment #3)

Is it a bug that 3.3 compiles it without a problem?

Yes see PR 14128 for which it shows why this error was added.

Comment 8 Kaveh Ghazi 2005-11-30 18:41:57 UTC

Patch backported to 3.4 and 4.0.