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 middle-end/42344] [4.5 Regression] ICE in rs6000.md with ipa-sra for 252.eon



------- Comment #5 from amodra at gmail dot com  2010-01-28 02:49 -------
OK, so at the time we call make_decl_rtl for mrSurfaceList::operator[]

(gdb) bt
#0  rs6000_elf_encode_section_info (decl=0x40402a00, rtl=0x404014a0, first=1)
    at /home/alan/src/gcc/gcc/config/rs6000/rs6000.c:23487
#1  0x1082a4e4 in make_decl_rtl (decl=0x40402a00)
    at /home/alan/src/gcc/gcc/varasm.c:1471
#2  0x1082b924 in notice_global_symbol (decl=0x40402a00)
    at /home/alan/src/gcc/gcc/varasm.c:1628
#3  0x108839e8 in cgraph_mark_reachable_node (node=0x4035c1b0)
    at /home/alan/src/gcc/gcc/cgraph.c:1479
#4  0x10889fd0 in cgraph_analyze_functions ()
    at /home/alan/src/gcc/gcc/cgraphunit.c:980
#5  0x1088c250 in cgraph_finalize_compilation_unit ()
    at /home/alan/src/gcc/gcc/cgraphunit.c:1073
#6  0x1012fbdc in cp_write_global_declarations ()
    at /home/alan/src/gcc/gcc/cp/decl2.c:3780

we see these flags on the function decl:
addressable used public static weak autoinline decl_5

The weak flag makes default_binds_local_p decide that this is non-local so
doesn't set SYMBOL_REF_LOCAL_P on the rtl.

Later, here:
(gdb) bt
#0  cgraph_make_node_local (node=0x4035c1b0)
    at /home/alan/src/gcc/gcc/cgraph.c:2157
#1  0x106e15e4 in modify_function () at /home/alan/src/gcc/gcc/tree-sra.c:3798
#2  ipa_early_sra () at /home/alan/src/gcc/gcc/tree-sra.c:3891
#3  0x1051f750 in execute_one_pass (pass=0x11045634)
    at /home/alan/src/gcc/gcc/passes.c:1522
#4  0x1051fac4 in execute_pass_list (pass=0x11045634)
    at /home/alan/src/gcc/gcc/passes.c:1577
#5  0x1051fadc in execute_pass_list (pass=0x11045470)
    at /home/alan/src/gcc/gcc/passes.c:1578
#6  0x105221d4 in do_per_function_toporder (pass=0x11045408)
    at /home/alan/src/gcc/gcc/passes.c:1120
#7  execute_ipa_pass_list (pass=0x11045408)
    at /home/alan/src/gcc/gcc/passes.c:1759
#8  0x1088c034 in ipa_passes () at /home/alan/src/gcc/gcc/cgraphunit.c:1716
#9  cgraph_optimize () at /home/alan/src/gcc/gcc/cgraphunit.c:1775
#10 0x1088c25c in cgraph_finalize_compilation_unit ()
    at /home/alan/src/gcc/gcc/cgraphunit.c:1082
#11 0x1012fbdc in cp_write_global_declarations ()
    at /home/alan/src/gcc/gcc/cp/decl2.c:3780

a bunch of flags on the function decl are cleared, including the weak flag.
So rs6000_function_ok_for_sibcall quite happily says that a sibcall is OK,
***but the rtl flags have not been updated***.
In particular, SYMBOL_REF_LOCAL_P clear stops rs6000.md:sibcall_value_local32
from matching, and we try to use sibcall_value_nonlocal_sysv.

Seems to me that the rtl flags need updating in cgraph_make_node_local.


-- 


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


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