Bug 19275 - [3.4/4.0] gcc.dg/20020919-1.c fails with -fpic/-fPIC on i686-pc-linux-gnu
Summary: [3.4/4.0] gcc.dg/20020919-1.c fails with -fpic/-fPIC on i686-pc-linux-gnu
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: testsuite (show other bugs)
Version: 3.4.4
: P2 normal
Target Milestone: 3.4.5
Assignee: Kaveh Ghazi
URL: http://gcc.gnu.org/ml/gcc-patches/200...
Keywords:
Depends on:
Blocks: 23224
  Show dependency treegraph
 
Reported: 2005-01-05 19:25 UTC by Kaveh Ghazi
Modified: 2005-11-30 18:41 UTC (History)
1 user (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2005-11-29 14:25:19


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 Andrew Pinski 2005-01-05 19:26:47 UTC
These should be just skiped with -fPIC.
Comment 2 Andrew 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 Andrew 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 5 Kaveh Ghazi 2005-11-29 14:25:19 UTC
These two patches fixed the problem on mainline/4.1 and need to be backported:
http://gcc.gnu.org/ml/gcc-patches/2005-03/msg02322.html
http://gcc.gnu.org/ml/gcc-patches/2005-03/msg02828.html

I'll do it after testing.
Comment 6 Kaveh Ghazi 2005-11-30 18:04:52 UTC
Subject: Bug 19275

Author: ghazi
Date: Wed Nov 30 18:04:46 2005
New Revision: 107729

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107729
Log:
	PR testsuite/19275
	Backport from mainline:

	* gcc.dg/20020919-1.c:  Fix for x86 Darwin.
	* gcc.dg/20020919-1.c:  Remove unnecessary conditional.


Modified:
    branches/gcc-3_4-branch/gcc/testsuite/ChangeLog
    branches/gcc-3_4-branch/gcc/testsuite/gcc.dg/20020919-1.c

Comment 7 Kaveh Ghazi 2005-11-30 18:06:05 UTC
Subject: Bug 19275

Author: ghazi
Date: Wed Nov 30 18:06:01 2005
New Revision: 107730

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107730
Log:
	PR testsuite/19275
	Backport from mainline:

	* gcc.dg/20020919-1.c:  Fix for x86 Darwin.
	* gcc.dg/20020919-1.c:  Remove unnecessary conditional.


Modified:
    branches/gcc-4_0-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_0-branch/gcc/testsuite/gcc.dg/20020919-1.c

Comment 8 Kaveh Ghazi 2005-11-30 18:41:57 UTC
Patch backported to 3.4 and 4.0.