This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/51493] New: [4.7 regression] ICE when compiling scummvm with -O2 and any graphite optimization


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51493

             Bug #: 51493
           Summary: [4.7 regression] ICE when compiling scummvm with -O2
                    and any graphite optimization
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: matt@use.net


With trunk as of 2011-12-09, on Ubuntu 11.10/amd64.

I was able to reproduce what *appears to be* the issue on the individual file
(pre-processed source attached), but only with a specific set of configure
flags to scummvm. An alternate testcase involving LTO is also here, which I can
split out to a separate bug if need be.

$ g++ -O2 -floop-block res_ami.i
engines/agos/res_ami.cpp: In member function âbyte*
AGOS::AGOSEngine::convertImage(AGOS::VC10_state*, bool)â:
engines/agos/res_ami.cpp:143:7: internal compiler error: in
scan_tree_for_params_right_scev, at graphite-sese-to-poly.c:633

Note that pretty much any loop-based flag will trigger the issue. Only using
-O2, or using -O1 with -floop-* works around the crash. When running the above
test case under valgrind, I see:
==21219== Conditional jump or move depends on uninitialised value(s)
==21219==    at 0xD02445: refs_may_alias_p_1(ao_ref_s*, ao_ref_s*, bool)
(tree-ssa-alias.c:1027)
==21219==    by 0xA92139: stmt_may_clobber_ref_p_1(gimple_statement_d*,
ao_ref_s*) (tree-ssa-alias.c:1762)
==21219==    by 0xA92210:
_ZL20walk_aliased_vdefs_1P8ao_ref_sP9tree_nodePFbS0_S2_PvES3_PP15bitmap_head_defj.955263.constprop.2845.16875
(tree-ssa-alias.c:2158)
==21219==    by 0xA9238D: walk_aliased_vdefs(ao_ref_s*, tree_node*, bool
(*)(ao_ref_s*, tree_node*, void*), void*, bitmap_head_def**)
(tree-ssa-alias.c:2178)
==21219==    by 0xA9335E:
_ZL20detect_type_change_1P9tree_nodeS0_S0_P18gimple_statement_dP13ipa_jump_funcl.498561.15992
(ipa-prop.c:460)
==21219==    by 0xA9634B: ipa_analyze_node(cgraph_node*) (ipa-prop.c:1505)
==21219==    by 0xA96F88: _ZL21ipcp_generate_summaryv.1445752 (ipa-cp.c:2490)
==21219==    by 0xE3AF25: execute_ipa_summary_passes(ipa_opt_pass_d*)
(passes.c:1888)
==21219==    by 0x9912C6: cgraph_optimize() (cgraphunit.c:2059)
==21219==    by 0x991559: cgraph_finalize_compilation_unit()
(cgraphunit.c:1327)
==21219==    by 0xCE3EBA: cp_write_global_declarations() (decl2.c:4050)
==21219==    by 0xC8DA2F: toplev_main(int, char**) (toplev.c:573)
==21219==  Uninitialised value was created by a stack allocation
==21219==    at 0xA934ED:
_ZL22detect_type_change_ssaP9tree_nodeP18gimple_statement_dP13ipa_jump_func.498569.15987
(ipa-prop.c:511)



The ICE is on any graphite-related flag and has potentally related valgrind
output; Otherwise, I would think this is a regression of PR42930 (which it may
actually be).

to reproduce with LTO:
-get latest scummvm sources, unpack and cd into the dir
-CXX=/path/to/gcc-trunk/bin/g++ CXXFLAGS="-O2 -flto -floop-block" LDFLAGS="-O2
-flto -floop-block" ./configure --disable-all-engines --enable-agos

-make
-during final link

result:
In file included from :422:0:
engines/agos/res_ami.cpp: In member function âconvertImageâ:
engines/agos/res_ami.cpp:143:0: internal compiler error: in
scan_tree_for_params_right_scev, at graphite-sese-to-poly.c:633

NOTE: looks like the fully qualified class name gets clobbered during LTO :(
I'll file in a separate bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]