Bug 35118 - ICE in mem_loc_descriptor, at dwarf2out.c:8974
Summary: ICE in mem_loc_descriptor, at dwarf2out.c:8974
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: debug (show other bugs)
Version: 4.2.3
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2008-02-07 10:22 UTC by tim blechmann
Modified: 2013-03-29 11:09 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Known to work: 4.3.0
Known to fail: 4.2.3
Last reconfirmed:


Attachments
preprocessed source file (92.02 KB, application/x-bzip)
2008-02-07 10:22 UTC, tim blechmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tim blechmann 2008-02-07 10:22:05 UTC
gcc crashes with an ICE, when generating code with debugging information. if the flag -g is omitted, the code compiles fine ...

gcc is invoked like this:
gcc-4.2 -v  -save-temps -DNDEBUG -D_PTHREADS -D_THREAD_SAFE -D_REENTRANT -D_POSIX_SOURCE -march=i686 -O -Wfatal-errors -I../../Demo -I../../Source -g  -c ../../Demo/TestHashTable.cpp
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --disable-libmudflap --enable-targets=all --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.2.3 20080114 (prerelease) (Debian 4.2.2-7)
 /usr/lib/gcc/i486-linux-gnu/4.2.3/cc1plus -E -quiet -v -I../../Demo -I../../Source -D_GNU_SOURCE -DNDEBUG -D_PTHREADS -D_THREAD_SAFE -D_REENTRANT -D_POSIX_SOURCE ../../Demo/TestHashTable.cpp -march=i686 -Wfatal-errors -fworking-directory -O -fpch-preprocess -o TestHashTable.ii
ignoring nonexistent directory "/usr/local/include/i486-linux-gnu"
ignoring nonexistent directory "/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../i486-linux-gnu/include"
ignoring nonexistent directory "/usr/include/i486-linux-gnu"
#include "..." search starts here:
#include <...> search starts here:
 ../../Demo
 ../../Source
 /usr/include/c++/4.2
 /usr/include/c++/4.2/i486-linux-gnu
 /usr/include/c++/4.2/backward
 /usr/local/include
 /usr/lib/gcc/i486-linux-gnu/4.2.3/include
 /usr/include
End of search list.
 /usr/lib/gcc/i486-linux-gnu/4.2.3/cc1plus -fpreprocessed TestHashTable.ii -quiet -dumpbase TestHashTable.cpp -march=i686 -auxbase TestHashTable -g -O -Wfatal-errors -version -o TestHashTable.s
GNU C++ version 4.2.3 20080114 (prerelease) (Debian 4.2.2-7) (i486-linux-gnu)
	compiled by GNU C version 4.2.3 20080114 (prerelease) (Debian 4.2.2-7).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: f406bbb58e12163da4726a4b8abbe4e4
../../Demo/TestHashTable.cpp: In static member function ‘static void CTestHashTable::TestHashTableRandomly(time_t&)’:
../../Demo/TestHashTable.cpp:130: internal compiler error: in mem_loc_descriptor, at dwarf2out.c:8974
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.2/README.Bugs>.

the preprocessed file is attached. gcc-4.3 seems to work fine ...
Comment 1 tim blechmann 2008-02-07 10:22:43 UTC
Created attachment 15113 [details]
preprocessed source file
Comment 2 Joost VandeVondele 2009-08-08 18:01:46 UTC
doesn't compile with trunk?

gcc -DNDEBUG -D_PTHREADS -D_THREAD_SAFE -D_REENTRANT -D_POSIX_SOURCE  -O -Wfatal-errors -g -c t.ii
In file included from /usr/include/c++/4.2/bits/stl_algobase.h:72:0,
                 from /usr/include/c++/4.2/bits/char_traits.h:46,
                 from /usr/include/c++/4.2/string:47,
                 from ../../Demo/TestHashTable.cpp:22:
/usr/include/c++/4.2/bits/cpp_type_traits.h:346:12: error: expected identifier before ‘__is_pod’
compilation terminated due to -Wfatal-errors.
Comment 3 Joost VandeVondele 2013-03-29 11:09:49 UTC
testcase doesn't compile with trunk anymore. I suspect the original problem is fixed. If not, please provide an updated testcase.