Bug 16432 - ICE with C++ code returning structure when using -O3
Summary: ICE with C++ code returning structure when using -O3
Status: RESOLVED DUPLICATE of bug 15461
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.4.1
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-08 11:01 UTC by Andrew Roberts
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host: i386-redhat-linux
Target: i386-redhat-linux
Build: i386-redhat-linux
Known to work:
Known to fail:
Last reconfirmed:


Attachments
This is the preprocessed source generated when compiling the program (32.03 KB, application/octet-stream)
2004-07-08 11:03 UTC, Andrew Roberts
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Roberts 2004-07-08 11:01:10 UTC
ICE with C++ code returning structure when using -O3. Can be worked around by 
not using -O3 or returning structure as an argument.

Running on Fedora Core 2, with all updates as of 08/07/2004. System has fresh 
install of gcc 3.4.1 (built with gcc 3.4.0) no special redhat compilers 
involved.

uname -a gives:
Linux barn 2.6.6-1.435.2.3 #1 Thu Jul 1 08:25:29 EDT 2004 i686 athlon i386 
GNU/Linux

gcc -v gives:
Reading specs from /usr/local/lib/gcc/i386-redhat-linux/3.4.1/specs
Configured with: ../gcc-3.4.1/configure --enable-shared --enable-
threads=posix --disable-checking --disable-libunwind-exceptions --with-system-
zlib --enable-__cxa_atexit --host=i386-redhat-linux --enable-
languages=c,c++,f77 --disable-libgcj
Thread model: posix
gcc version 3.4.1

The error is as follows:
# g++ -O3 -save-temps -o gccerr gccerr.cpp 
gccerr.cpp: In function `int main()':
gccerr.cpp:78: internal compiler error: in make_decl_rtl, at varasm.c:752
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

I'll attach the processed listing file (bz2 compressed).

The source code is heavily cut down from a real program which failed to build. 
The source is small and fully standalone, but don't expect it to run.
Comment 1 Andrew Roberts 2004-07-08 11:03:12 UTC
Created attachment 6710 [details]
This is the preprocessed source generated when compiling the program

This is the preprocessed source generated when compiling the program using:
-save-temps
Comment 2 Eric Botcazou 2004-07-08 11:32:24 UTC

*** This bug has been marked as a duplicate of 15461 ***