public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/51493] New: [4.7 regression] ICE when compiling scummvm with -O2 and any graphite optimization
@ 2011-12-10  3:24 matt at use dot net
  2011-12-10  3:36 ` [Bug tree-optimization/51493] " matt at use dot net
  2011-12-12 10:19 ` rguenth at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: matt at use dot net @ 2011-12-10  3:24 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug tree-optimization/51493] [4.7 regression] ICE when compiling scummvm with -O2 and any graphite optimization
  2011-12-10  3:24 [Bug tree-optimization/51493] New: [4.7 regression] ICE when compiling scummvm with -O2 and any graphite optimization matt at use dot net
@ 2011-12-10  3:36 ` matt at use dot net
  2011-12-12 10:19 ` rguenth at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: matt at use dot net @ 2011-12-10  3:36 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Matt Hargett <matt at use dot net> 2011-12-10 03:24:45 UTC ---
Created attachment 26039
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26039
pre-processed source of the file that triggers the ICE when compiled with -O2
-floop-block


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug tree-optimization/51493] [4.7 regression] ICE when compiling scummvm with -O2 and any graphite optimization
  2011-12-10  3:24 [Bug tree-optimization/51493] New: [4.7 regression] ICE when compiling scummvm with -O2 and any graphite optimization matt at use dot net
  2011-12-10  3:36 ` [Bug tree-optimization/51493] " matt at use dot net
@ 2011-12-12 10:19 ` rguenth at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-12-12 10:19 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE
   Target Milestone|---                         |4.7.0

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-12 10:16:31 UTC ---
dup.

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-12-12 10:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-10  3:24 [Bug tree-optimization/51493] New: [4.7 regression] ICE when compiling scummvm with -O2 and any graphite optimization matt at use dot net
2011-12-10  3:36 ` [Bug tree-optimization/51493] " matt at use dot net
2011-12-12 10:19 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).