Bug 30366 - gcc-4.2.0_alpha20061205 has problems with -Os
Summary: gcc-4.2.0_alpha20061205 has problems with -Os
Status: RESOLVED DUPLICATE of bug 29841
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 4.2.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-04 12:04 UTC by Michael
Modified: 2007-01-04 12:12 UTC (History)
7 users (show)

See Also:
Host: i686 AMD Athlon(tm)
Target: i686-pc-linux-gnu
Build: ?
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael 2007-01-04 12:04:28 UTC
Hello everyone. Someone at the gentoo forums said i should report this here, so i will try to provide a useful bug-report. If it isnt useful fell free to ignore it.

After i rebuilt my whole toolchain with gcc-4.2 (which worked without problems) i wanted to rebuild every package on my system. My CFLAGS were: "-march=athlon-xp -Os -fomit-frame-pointer -fno-ident -pipe".

But even after several retries openssl-0.9.8d failed to compile with the following error:
i686-pc-linux-gnu-gcc -I.. -I../.. -I../../include -fPIC -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DTERMIO -Wall -DOPENSSL_BN_ASM_PART_WORDS -DSHA1_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -march=athlon-xp -Os -fomit-frame-pointer -fno-ident -pipe -Wa,--noexecstack -c -o evp_pkey.o evp_pkey.c 
 evp_pkey.c: In Funktion »EVP_PKEY2PKCS8_broken«: 
 evp_pkey.c:382: Warning: Function called over not compatible type 
 evp_pkey.c:382: Anmerkung: Wenn dieser Code erreicht wird, wird das Programm abgebrochen 
 evp_pkey.c: In Funktion »dsa_pkey2pkcs8«: 
 evp_pkey.c:478: Warning: Function called over not compatible type 
 evp_pkey.c:478: Anmerkung: Wenn dieser Code erreicht wird, wird das Programm abgebrochen 
 evp_pkey.c: In Funktion »EVP_PKEY2PKCS8_broken«: 
 evp_pkey.c:416: internal Compiler-error: Memory access error

After i set my CFLAGS to "-march=athlon-xp -O2 -fomit-frame-pointer -fno-ident -pipe" everything worked.

It was the same with qt-3.3.6-r5. It didnt built with -Os but with -O2.

I hope this helps somehow.
And thank you for your effort :)

brot
Comment 1 Andrew Pinski 2007-01-04 12:10:21 UTC
First the code is undefined so the code will abort at runtime.
Second this is a dup of bug 29841.

*** This bug has been marked as a duplicate of 29841 ***
Comment 2 Andrew Pinski 2007-01-04 12:12:06 UTC
Also really you should report problems like this to the distro (or person) who provided you the compiler.