I get the following segfault with gcc 4.3 20070326 and 20070417. It works with gcc 4.2:
Analyzing compilation unit Performing interprocedural optimizations <visibility> <early_local_cleanups> <inline> <static-var> <pure-const> <type-escape-var> Program received signal SIGSEGV, Segmentation fault. integer_zerop (expr=0x0) at /home/tbm/scratch/gcc/gcc/tree.c:1295 1295 STRIP_NOPS (expr); (gdb) where #0 integer_zerop (expr=0x0) at /home/tbm/scratch/gcc/gcc/tree.c:1295 #1 0x0000000000923316 in okay_pointer_operation (code=IDENTIFIER_NODE, op0=0x2b94c001cd20, op1=0x2b94bfcbeba0) at /home/tbm/scratch/gcc/gcc/ipa-type-escape.c:1471 #2 0x00000000009252fb in scan_for_refs (tp=<value optimized out>, walk_subtrees=0x7fffeb506cfc, data=<value optimized out>) at /home/tbm/scratch/gcc/gcc/ipa-type-escape.c:1544 #3 0x00000000008ca35b in walk_tree (tp=0x2b94bfffbd70, func=0x924f20 <scan_for_refs>, data=0x2b94bfeade00, pset=0xee27e0) at /home/tbm/scratch/gcc/gcc/tree.c:7978 #4 0x0000000000921bb8 in type_escape_execute () at /home/tbm/scratch/gcc/gcc/ipa-type-escape.c:1707 #5 0x000000000070b5d1 in execute_one_pass (pass=0xdff8c0) at /home/tbm/scratch/gcc/gcc/passes.c:1058 #6 0x000000000070b7e5 in execute_ipa_pass_list (pass=0xdff8c0) at /home/tbm/scratch/gcc/gcc/passes.c:1126 -- Summary: [4.3 Regression] Segfault in integer_zerop, called via ipa-type-escape.c Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tbm at cyrius dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31617