Bug 42707 - [4.5 Regression] ICE - segfault in mark_operand_necessary
Summary: [4.5 Regression] ICE - segfault in mark_operand_necessary
Status: RESOLVED DUPLICATE of bug 42704
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
Depends on:
Reported: 2010-01-12 15:43 UTC by Matthias Klose
Modified: 2010-01-12 16:50 UTC (History)
4 users (show)

See Also:
Known to work: 4.4.3
Known to fail: 4.5.0
Last reconfirmed:

preprocessed source (40.92 KB, application/x-gzip)
2010-01-12 15:43 UTC, Matthias Klose

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Klose 2010-01-12 15:43:04 UTC
seen with trunk 20100112, not with the 4.4 branch; lowering optimization to -O1 works around the segfault.

$ g++ -c -g -O2 nsTreeRows.ii
/scratch/packages/tmp/rebuild/kompozer-0.8~b1/mozilla/content/xul/templates/src/nsTreeRows.cpp: In member function 'void nsTreeRows::InvalidateCachedRow()':
/scratch/packages/tmp/rebuild/kompozer-0.8~b1/mozilla/content/xul/templates/src/nsTreeRows.cpp:483:1: internal compiler error: Segmentation fault
Please submit a full bug report,

Program received signal SIGSEGV, Segmentation fault.
mark_operand_necessary (aggressive=<value optimized out>) at ../../src/gcc/tree-ssa-dce.c:265
265         SET_BIT (bb_contains_live_stmts, gimple_bb (stmt)->index);
(gdb) bt
#0  mark_operand_necessary (aggressive=<value optimized out>) at ../../src/gcc/tree-ssa-dce.c:265
#1  propagate_necessity (aggressive=<value optimized out>) at ../../src/gcc/tree-ssa-dce.c:705
#2  perform_tree_ssa_dce (aggressive=<value optimized out>) at ../../src/gcc/tree-ssa-dce.c:1389
#3  0x000000000070bbae in execute_one_pass (pass=0x1129080) at ../../src/gcc/passes.c:1561
#4  0x000000000070be15 in execute_pass_list (pass=0x1129080) at ../../src/gcc/passes.c:1616
#5  0x000000000070be27 in execute_pass_list (pass=0x1128a20) at ../../src/gcc/passes.c:1617
#6  0x000000000070b668 in do_per_function_toporder (callback=0x70be00 <execute_pass_list>, data=0x1128b40) at ../../src/gcc/passes.c:1142
#7  0x000000000070c08a in execute_ipa_pass_list (pass=0x11289c0) at ../../src/gcc/passes.c:1800
#8  0x0000000000908e29 in ipa_passes () at ../../src/gcc/cgraphunit.c:1768
#9  cgraph_optimize () at ../../src/gcc/cgraphunit.c:1829
#10 0x0000000000908f85 in cgraph_finalize_compilation_unit () at ../../src/gcc/cgraphunit.c:1093
#11 0x00000000004f349c in cp_write_global_declarations () at ../../src/gcc/cp/decl2.c:3798
#12 0x000000000079f3a6 in compile_file (argc=14, argv=0x7fffffffe5f8) at ../../src/gcc/toplev.c:1065
#13 do_compile (argc=14, argv=0x7fffffffe5f8) at ../../src/gcc/toplev.c:2405
#14 toplev_main (argc=14, argv=0x7fffffffe5f8) at ../../src/gcc/toplev.c:2447
#15 0x00007ffff616cabd in __libc_start_main () from /lib/libc.so.6
#16 0x000000000049f179 in _start ()
Comment 1 Matthias Klose 2010-01-12 15:43:53 UTC
Created attachment 19553 [details]
preprocessed source
Comment 2 Richard Biener 2010-01-12 16:43:31 UTC
Looks like PR42704 which is what I reproduce with the testcase in this
bug as well.  I guess you built 4.5 w/o checking.

*** This bug has been marked as a duplicate of 42704 ***
Comment 3 Matthias Klose 2010-01-12 16:50:46 UTC
configured with --enable-checking=release