Bug 15095 - [3.4/4.0 Regression] gcc-3.4.0 fails to compile gmp-4.1.2
Summary: [3.4/4.0 Regression] gcc-3.4.0 fails to compile gmp-4.1.2
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 3.4.0
: P2 critical
Target Milestone: 3.4.1
Assignee: Not yet assigned to anyone
URL:
Keywords: rejects-valid
: 15132 17830 17932 25415 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-04-23 10:51 UTC by keith.briggs
Modified: 2007-04-17 06:16 UTC (History)
5 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work: 3.3.3
Known to fail: 3.4.0 4.0.0
Last reconfirmed:


Attachments
preprocessed source of mpz/aorsmul.c from gmp-4.1.2 (5.87 KB, text/plain)
2004-04-23 11:49 UTC, keith.briggs
Details

Note You need to log in before you can comment on or make changes to this bug.
Description keith.briggs 2004-04-23 10:51:14 UTC
install@sodium:~/gmp-4.1.2/mpz> /usr/local/bin/gcc -DHAVE_CONFIG_H -I. -I. -
I.. -D__GMP_WITHIN_GMP -I.. -g -O2 -fomit-frame-pointer -mcpu=pentium4 -
march=pentium4 -c aorsmul.c

`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
aorsmul.c:44: error: conflicting types for '__gmpz_aorsmul'
aorsmul.c:39: error: previous declaration of '__gmpz_aorsmul' was here
aorsmul.c:44: error: conflicting types for '__gmpz_aorsmul'
aorsmul.c:39: error: previous declaration of '__gmpz_aorsmul' was here

Torbjörn Granlund says:
I think this is a bug in the gcc 3.4 parser that causes it to
reject regparm attributes.  I have tried to figure out some
alternative syntax that gcc 3.4 could accept, but found nil.
Comment 1 Andrew Pinski 2004-04-23 11:41:24 UTC
Can you attach the preprocessed source?
Comment 2 keith.briggs 2004-04-23 11:49:18 UTC
Created attachment 6149 [details]
preprocessed source of mpz/aorsmul.c from gmp-4.1.2
Comment 3 Andrew Pinski 2004-04-25 01:51:57 UTC
See <http://gcc.gnu.org/ml/gcc/2004-03/msg00039.html> for why this was changed.
Comment 4 Andrew Pinski 2004-04-25 15:37:56 UTC
*** Bug 15132 has been marked as a duplicate of this bug. ***
Comment 5 Andrew Pinski 2004-10-04 22:42:50 UTC
*** Bug 17830 has been marked as a duplicate of this bug. ***
Comment 6 Andrew Pinski 2004-10-11 14:14:41 UTC
*** Bug 17932 has been marked as a duplicate of this bug. ***
Comment 7 Andrew Pinski 2005-12-14 17:44:43 UTC
*** Bug 25415 has been marked as a duplicate of this bug. ***
Comment 8 vingo 2007-04-17 06:16:56 UTC
The problem still exist. My working environment is :
GCC : gcc (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
GMP : the latest release version (gmp4.1)

During compiling, the error will occur.
But I fount if I remove the code "static void __gmpz_aorsmul _PROTO ((REGPARM_3_1 (mpz_ptr w, mpz_srcptr x, mpz_srcptr y, mp_size_t sub))) REGPARM_ATTR (1);" , it can be passed.
So to solve the problem, you can remove the static declaration for the functions that have conflicting type. But I am not sure whether is correct or not. It only make the process of compiling passed.