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

--- Comment #17 from H.J. Lu <hjl.tools at gmail dot com> ---
Without -fPIC, r202145 gave

pr63814.C:44:1: error: edge points to wrong declaration:
 }
 ^
 <function_decl 0x7f56f87c6400 MixinFunc.constprop
    type <method_type 0x7f56f87bdf18
        type <pointer_type 0x7f56f8643c78 type <void_type 0x7f56f8643bd0 void>
            public unsigned SI
            size <integer_cst 0x7f56f8627fc0 constant 32>
            unit size <integer_cst 0x7f56f8627fe0 constant 4>
            align 32 symtab 0 alias set 4 canonical type 0x7f56f8643c78
            pointer_to_this <pointer_type 0x7f56f8652888>>
        QI
        size <integer_cst 0x7f56f8645180 constant 8>
        unit size <integer_cst 0x7f56f86451a0 constant 1>
        align 8 symtab 0 alias set -1 canonical type 0x7f56f87bdf18 method
basetype <record_type 0x7f56f87a0738 CExample>
        arg-types <tree_list 0x7f56f87c86b8 value <pointer_type 0x7f56f87a09d8>
            chain <tree_list 0x7f56f8636aa0 value <void_type 0x7f56f8643bd0
void>>>>
    addressable used static autoinline decl_5 QI defer-output file pr63814.C
line 24 col 9 align 16 context <record_type 0x7f56f87a0738 CExample>
    full-name "void* CExample::MixinFunc.constprop()"
    pending-inline-info 0x7f56f87aa880>
 Instead of: <function_decl 0x7f56f8783900 _ZThn4_N8CExample9MixinFuncEiPv
    type <method_type 0x7f56f87a0bd0
        type <pointer_type 0x7f56f8643c78 type <void_type 0x7f56f8643bd0 void>
            public unsigned SI
            size <integer_cst 0x7f56f8627fc0 constant 32>
            unit size <integer_cst 0x7f56f8627fe0 constant 4>
            align 32 symtab 0 alias set 4 canonical type 0x7f56f8643c78
            pointer_to_this <pointer_type 0x7f56f8652888>>
        QI
        size <integer_cst 0x7f56f8645180 constant 8>
        unit size <integer_cst 0x7f56f86451a0 constant 1>
        align 8 symtab 0 alias set -1 canonical type 0x7f56f87a0bd0 method
basetype <record_type 0x7f56f87a0738 CExample>
        arg-types <tree_list 0x7f56f879f5a0 value <pointer_type 0x7f56f87a09d8>
            chain <tree_list 0x7f56f879f1e0 value <integer_type 0x7f56f86435e8
int>
                chain <tree_list 0x7f56f879f208 value <pointer_type
0x7f56f8643c78>
                    chain <tree_list 0x7f56f8636aa0 value <void_type
0x7f56f8643bd0 void>>>>>
        pointer_to_this <pointer_type 0x7f56f87a7150>>
    addressable asm_written used public weak virtual decl_5 QI file pr63814.C
line 24 col 9 align 8 context <record_type 0x7f56f87a0738 CExample>
    arguments <parm_decl 0x7f56f87aaa80 this
        type <pointer_type 0x7f56f87a0a80 type <record_type 0x7f56f87a0738
CExample>
            readonly unsigned SI size <integer_cst 0x7f56f8627fc0 32> unit size
<integer_cst 0x7f56f8627fe0 4>
            align 32 symtab 0 alias set -1 canonical type 0x7f56f87a0a80>
        readonly used unsigned SI file pr63814.C line 24 col 39 size
<integer_cst 0x7f56f8627fc0 32> unit size <integer_cst 0x7f56f8627fe0 4>
        align 32 context <function_decl 0x7f56f8783900
_ZThn4_N8CExample9MixinFuncEiPv> arg-type <pointer_type 0x7f56f87a0a80>
        chain <parm_decl 0x7f56f87aab00 arg type <integer_type 0x7f56f86435e8
int>
            used SI file pr63814.C line 24 col 24 size <integer_cst
0x7f56f8627fc0 32> unit size <integer_cst 0x7f56f8627fe0 4>
            align 32 context <function_decl 0x7f56f8783900
_ZThn4_N8CExample9MixinFuncEiPv>
            arg-type <integer_type 0x7f56f86435e8 int> chain <parm_decl
0x7f56f87aab80 arg2>>>
    full-name "virtual void* CExample::_ZThn4_N8CExample9MixinFuncEiPv(int,
void*)"
   >
main/14 (int main()) @0x7f56f87b1390
  Type: function definition analyzed
  Visibility: externally_visible public
  References: _ZTV5CBase/17 (addr)_ZTV6MMixin/16 (addr)_ZTV8CExample/15
(addr)_ZTV8CExample/15 (addr)
  Referring: 
  Availability: available
  Function flags: body only_called_at_startup
  Called by: 
  Calls: _ZN8CExample9MixinFuncEiPv.constprop.0/36 (1.00 per call) (can throw
external) 
pr63814.C:44:1: internal compiler error: verify_cgraph_node failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Reply via email to