Bug 52780 - ice in create_preheader with -O2
Summary: ice in create_preheader with -O2
Status: RESOLVED DUPLICATE of bug 52772
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.8.0
: P3 normal
Target Milestone: ---
Assignee: Richard Biener
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-29 19:37 UTC by David Binderman
Modified: 2012-03-30 09:44 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2012-03-30 00:00:00


Attachments
C++ source code (87.70 KB, text/x-c++src)
2012-03-29 19:38 UTC, David Binderman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2012-03-29 19:37:22 UTC
I just tried to compile the package tog-pegasus-2.11.1-5
on gcc-4.8 trunk dated 20120328 on an AMD x86_64 box.

The compiler said

NameSpaceManager.cpp: In function ‘void test01()’:
NameSpaceManager.cpp:139:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Here is a valgrind dump

==24018== Invalid read of size 4
==24018==    at 0x7D9787: create_preheader(loop*, int) (cfgloopmanip.c:1391)
==24018==    by 0x7D9AFD: create_preheaders(int) (cfgloopmanip.c:1443)
==24018==    by 0x9FBD0E: loop_optimizer_init(unsigned int) (loop-init.c:89)
==24018==    by 0x9FBDEE: rtl_loop_init() (loop-init.c:201)
==24018==    by 0xA5408C: execute_one_pass(opt_pass*) (passes.c:2079)
==24018==    by 0xA54606: execute_pass_list(opt_pass*) (passes.c:2134)
==24018==    by 0xB935CD: tree_rest_of_compilation(tree_node*) (tree-optimize.c:422)
==24018==    by 0x7ECFDD: cgraph_expand_function(cgraph_node*) (cgraphunit.c:1837)
==24018==    by 0x7F0D8B: cgraph_optimize() (cgraphunit.c:1904)
==24018==    by 0x7F1439: cgraph_finalize_compilation_unit() (cgraphunit.c:1344)
==24018==    by 0x5F49FA: cp_write_global_declarations() (decl2.c:4077)
==24018==    by 0xB19929: toplev_main(int, char**) (toplev.c:572)
==24018==  Address 0x30 is not stack'd, malloc'd or (recently) free'd
==24018==

Preprocessed source code attached. Flag -O2 required.
Comment 1 David Binderman 2012-03-29 19:38:55 UTC
Created attachment 27039 [details]
C++ source code
Comment 2 Richard Biener 2012-03-30 09:11:29 UTC
Mine.  Maybe a dup.
Comment 3 Richard Biener 2012-03-30 09:44:40 UTC
My patch for PR52772 also fixes this testcase.

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