https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65465

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
             Status|UNCONFIRMED                 |NEW
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|                            |2015-03-19
          Component|c++                         |ipa
                 CC|                            |mliska at suse dot cz
     Ever confirmed|0                           |1
            Summary|Internal compiler error: in |[5 Regression] Internal
                   |build2_stIat                |compiler error: in
                   |                            |build2_stIat
   Target Milestone|---                         |5.0

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed with a cross.  The single preprocessed file needs reducing still.

Breakpoint 1, internal_error (gmsgid=0x1b9ca6f "in %s, at %s:%d")
    at /space/rguenther/src/svn/trunk2/gcc/diagnostic.c:1221
1221      va_start (ap, gmsgid);
Missing separate debuginfos, use: zypper install
libgmp10-debuginfo-6.0.0-71.1.x86_64 libisl13-debuginfo-0.14-25.2.x86_64
libmpc3-debuginfo-1.0.2-38.2.x86_64
(gdb) bt
#0  internal_error (gmsgid=0x1b9ca6f "in %s, at %s:%d")
    at /space/rguenther/src/svn/trunk2/gcc/diagnostic.c:1221
#1  0x00000000016dee17 in fancy_abort (
    file=0x1898618 "/space/rguenther/src/svn/trunk2/gcc/tree.c", line=4383, 
    function=0x189e97f <build2_stat(tree_code, tree_node*, tree_node*,
tree_node*)::__FUNCTION__> "build2_stat")
    at /space/rguenther/src/svn/trunk2/gcc/diagnostic.c:1291
#2  0x000000000123f5ee in build2_stat (code=POINTER_PLUS_EXPR, 
    tt=0x7ffff58ee348, arg0=0x7ffff22c6168, arg1=0x7fffe3a71f20)
    at /space/rguenther/src/svn/trunk2/gcc/tree.c:4382
#3  0x0000000000b85010 in build2_stat_loc (loc=49934370, 
    code=POINTER_PLUS_EXPR, type=0x7ffff58ee348, arg0=0x7ffff22c6168, 
    arg1=0x7fffe3a71f20) at /space/rguenther/src/svn/trunk2/gcc/tree.h:3690
#4  0x0000000000bc4674 in fold_build2_stat_loc (loc=49934370, 
    code=POINTER_PLUS_EXPR, type=0x7ffff58ee348, op0=0x7ffff22c6168, 
    op1=0x7fffe3a71f20)
    at /space/rguenther/src/svn/trunk2/gcc/fold-const.c:14325
#5  0x0000000000bca659 in fold_build_pointer_plus_loc (loc=49934370, 
    ptr=0x7ffff22c6168, off=0x7ffff2386c60)
    at /space/rguenther/src/svn/trunk2/gcc/fold-const.c:16267
#6  0x0000000000a77933 in thunk_adjust (bsi=0x7fffffffd840, 
    ptr=0x7ffff22c6168, this_adjusting=false, fixed_offset=0, 
    virtual_offset=0x7fffdf18bfd8)
    at /space/rguenther/src/svn/trunk2/gcc/cgraphunit.c:1463
#7  0x0000000000a78e00 in cgraph_node::expand_thunk (this=0x7fffed309310, 
    output_asm_thunks=false, force_gimple_thunk=true)
    at /space/rguenther/src/svn/trunk2/gcc/cgraphunit.c:1750
#8  0x0000000000a7a9af in cgraph_node::create_wrapper (this=0x7fffed309310, 
    target=0x7fffe45d1498)
    at /space/rguenther/src/svn/trunk2/gcc/cgraphunit.c:2499
#9  0x000000000163afda in ipa_icf::sem_function::merge (this=0x32c5780, 
    alias_item=0x3a06280) at /space/rguenther/src/svn/trunk2/gcc/ipa-icf.c:1033
#10 0x0000000001641fa8 in ipa_icf::sem_item_optimizer::merge_classes (
    this=0x3757b50, prev_class_count=5884)
    at /space/rguenther/src/svn/trunk2/gcc/ipa-icf.c:2979
#11 0x000000000163f9ff in ipa_icf::sem_item_optimizer::execute (this=0x3757b50)
    at /space/rguenther/src/svn/trunk2/gcc/ipa-icf.c:2236
#12 0x0000000001642345 in ipa_icf::ipa_icf_driver ()
    at /space/rguenther/src/svn/trunk2/gcc/ipa-icf.c:3060
#13 0x0000000001642c59 in ipa_icf::pass_ipa_icf::execute (this=0x20fab80)

we build a POINTER_PLUS_EXPR of type 'struct AffineTransform'!?

1462          /* Adjust the `this' pointer.  */
1463          ptr = fold_build_pointer_plus_loc (input_location, ptr,
vtabletmp3);

but 'ptr' is

(gdb) p debug_tree (ptr)
 <result_decl 0x7ffff22c6168 D.736599
    type <record_type 0x7ffff58ee348 AffineTransform sizes-gimplified
needs-constructing type_1 type_5 type_6 BLK
        size <integer_cst 0x7ffff6749420 constant 384>

so it looks like we build bogus thunks or perform bogus merges.

Reply via email to