Bug 51769 - bootstrap fails when using -O2 -funswitch-loops -floop-flatten
Summary: bootstrap fails when using -O2 -funswitch-loops -floop-flatten
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.7.0
: P3 major
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-05 15:58 UTC by Matt Hargett
Modified: 2012-01-05 16:04 UTC (History)
1 user (show)

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


Attachments
pre-processed source of the file that triggers the ICE (124.29 KB, application/x-bzip)
2012-01-05 16:03 UTC, Matt Hargett
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Hargett 2012-01-05 15:58:26 UTC
Bootstrap has failed for at least a few months now when adding -floop-flatten and other options. I've filed several other bugs where loop-flatten with other options causes the same ICE across other popular open source projects: PR50398 and PR50561 come to mind.

To reproduce:

g++ -I/tmp/gcc-obj/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu -I/tmp/gcc-obj/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include -I/home/matt/src/gcc-4.7.0/libstdc++-v3/libsupc++ -L/tmp/gcc-obj/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -L/tmp/gcc-obj/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -c   -g -O2 -funswitch-loops -floop-flatten -DIN_GCC -fno-common  -DHAVE_CONFIG_H -I. -I. -I/home/matt/src/gcc-4.7.0/gcc -I/home/matt/src/gcc-4.7.0/gcc/. -I/home/matt/src/gcc-4.7.0/gcc/../include -I/home/matt/src/gcc-4.7.0/gcc/../libcpp/include  -I/home/matt/src/gcc-4.7.0/gcc/../libdecnumber -I/home/matt/src/gcc-4.7.0/gcc/../libdecnumber/bid -I../libdecnumber    /home/matt/src/gcc-4.7.0/gcc/caller-save.c -o caller-save.o


/home/matt/src/gcc-4.7.0/gcc/caller-save.c: In function ‘void init_save_areas()’:
/home/matt/src/gcc-4.7.0/gcc/caller-save.c:292:1: internal compiler error: in psct_dynamic_dim, at graphite-poly.h:659


This one does produce some potentially relevant valgrind output:

==5057== Conditional jump or move depends on uninitialised value(s)
==5057==    at 0x9E46B6: _ZL24call_may_clobber_ref_p_1P18gimple_statement_dP8ao_ref_s.951695.39962 (tree-ssa-alias.c:1494)
==5057==    by 0x9E506E: stmt_may_clobber_ref_p_1(gimple_statement_d*, ao_ref_s*) (tree-ssa-alias.c:1753)
==5057==    by 0x9E51F9: _ZL20walk_aliased_vdefs_1P8ao_ref_sP9tree_nodePFbS0_S2_PvES3_PP15bitmap_head_defj.951731.constprop.2807.35016 (tree-ssa-alias.c:2158)
==5057==    by 0x9E53D6: walk_aliased_vdefs(ao_ref_s*, tree_node*, bool (*)(ao_ref_s*, tree_node*, void*), void*, bitmap_head_def**) (tree-ssa-alias.c:2178)
==5057==    by 0xD6E9F4: _ZL20detect_type_change_1P9tree_nodeS0_S0_P18gimple_statement_dP13ipa_jump_funcl.496274.33562 (ipa-prop.c:460)
==5057==    by 0xD6F90B: _ZL35ipa_compute_jump_functions_for_edgeP19param_analysis_infoP11cgraph_edge.496762.33448 (ipa-prop.c:922)
==5057==    by 0xD70591: ipa_analyze_node(cgraph_node*) (ipa-prop.c:1203)
==5057==    by 0xD70CEC: _ZL21ipcp_generate_summaryv.1440941 (ipa-cp.c:2498)
==5057==    by 0xD99B92: execute_ipa_summary_passes(ipa_opt_pass_d*) (passes.c:1957)
==5057==    by 0xE87E94: cgraph_optimize() (cgraphunit.c:2059)
==5057==    by 0xE889D9: cgraph_finalize_compilation_unit() (cgraphunit.c:1327)
==5057==    by 0xE89046: cp_write_global_declarations() (decl2.c:4050)
==5057== 
==5057== Conditional jump or move depends on uninitialised value(s)
==5057==    at 0x9DF9DE: refs_may_alias_p_1(ao_ref_s*, ao_ref_s*, bool) (tree-ssa-alias.c:1027)
==5057==    by 0x9E5026: stmt_may_clobber_ref_p_1(gimple_statement_d*, ao_ref_s*) (tree-ssa-alias.c:1762)
==5057==    by 0x9E51F9: _ZL20walk_aliased_vdefs_1P8ao_ref_sP9tree_nodePFbS0_S2_PvES3_PP15bitmap_head_defj.951731.constprop.2807.35016 (tree-ssa-alias.c:2158)
==5057==    by 0x9E53D6: walk_aliased_vdefs(ao_ref_s*, tree_node*, bool (*)(ao_ref_s*, tree_node*, void*), void*, bitmap_head_def**) (tree-ssa-alias.c:2178)
==5057==    by 0xD6E9F4: _ZL20detect_type_change_1P9tree_nodeS0_S0_P18gimple_statement_dP13ipa_jump_funcl.496274.33562 (ipa-prop.c:460)
==5057==    by 0xD6F90B: _ZL35ipa_compute_jump_functions_for_edgeP19param_analysis_infoP11cgraph_edge.496762.33448 (ipa-prop.c:922)
==5057==    by 0xD70591: ipa_analyze_node(cgraph_node*) (ipa-prop.c:1203)
==5057==    by 0xD70CEC: _ZL21ipcp_generate_summaryv.1440941 (ipa-cp.c:2498)
==5057==    by 0xD99B92: execute_ipa_summary_passes(ipa_opt_pass_d*) (passes.c:1957)
==5057==    by 0xE87E94: cgraph_optimize() (cgraphunit.c:2059)
==5057==    by 0xE889D9: cgraph_finalize_compilation_unit() (cgraphunit.c:1327)
==5057==    by 0xE89046: cp_write_global_declarations() (decl2.c:4050)
Comment 1 Matt Hargett 2012-01-05 16:03:06 UTC
Created attachment 26255 [details]
pre-processed source of the file that triggers the ICE

commandline to trigger the ICE with the attached file (once decompressed):
g++ -O2 -funswitch-loops -floop-flatten -c caller-save.i

Removing any one of the options, or replacing the O2 with Os, eliminated the ICE.