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

            Bug ID: 71529
           Summary: [7 regression][CHKP] ICE in expand_expr_real_1
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ienkovich at gcc dot gnu.org
  Target Milestone: ---

This fail starts with r236299.  Looks like it happens because 'this' parameter
of instrumented constructor has wrong DECL_CONTEXT (not instrumented version of
function is used).

>cat small.ii
class c1
{
 public:
  virtual ~c1 ();
};

class c2
{
 public:
  virtual ~c2 ();
};

class c3 : c1, c2 { };

int main (int, char **)
{
  c3 obj;
}
>gcc-build/bin/g++ -O2 -fcheck-pointer-bounds -mmpx small.ii -S
small.i: In member function 'virtual void
c3::_ZThn8_N2c3D0Ev.chkp(#'pointer_bounds_type' not supported by
dump_type#<type error>, void, ...)':
small.i:13:7: internal compiler error: in expand_expr_real_1, at expr.c:9518
 class c3 : c1, c2 { };
       ^~
0xc6518c expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        /export/users/ienkovic/issues/common/gcc/gcc/expr.c:9512
0xc5e180 expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,
rtx_def**, bool)
        /export/users/ienkovic/issues/common/gcc/gcc/expr.c:7829
0xc462e7 expand_expr
        /export/users/ienkovic/issues/common/gcc/gcc/expr.h:272
0xc5cea3 expand_operands(tree_node*, tree_node*, rtx_def*, rtx_def**,
rtx_def**, expand_modifier)
        /export/users/ienkovic/issues/common/gcc/gcc/expr.c:7429
0xc6017b expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
        /export/users/ienkovic/issues/common/gcc/gcc/expr.c:8270
0xc6a472 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        /export/users/ienkovic/issues/common/gcc/gcc/expr.c:10747
0xc5e180 expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,
rtx_def**, bool)
        /export/users/ienkovic/issues/common/gcc/gcc/expr.c:7829
0xc462e7 expand_expr
        /export/users/ienkovic/issues/common/gcc/gcc/expr.h:272
0xc5d0c3 expand_expr_addr_expr_1
        /export/users/ienkovic/issues/common/gcc/gcc/expr.c:7488
0xc5d8b4 expand_expr_addr_expr_1
        /export/users/ienkovic/issues/common/gcc/gcc/expr.c:7585
0xc5dd14 expand_expr_addr_expr
        /export/users/ienkovic/issues/common/gcc/gcc/expr.c:7661
0xc6a379 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        /export/users/ienkovic/issues/common/gcc/gcc/expr.c:10691
0xc5e180 expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,
rtx_def**, bool)
        /export/users/ienkovic/issues/common/gcc/gcc/expr.c:7829
0xc5525f store_expr_with_bounds(tree_node*, rtx_def*, int, bool, bool,
tree_node*)
        /export/users/ienkovic/issues/common/gcc/gcc/expr.c:5276
0xc53e82 expand_assignment(tree_node*, tree_node*, bool)
        /export/users/ienkovic/issues/common/gcc/gcc/expr.c:5042
0xb0d8bd expand_gimple_stmt_1
        /export/users/ienkovic/issues/common/gcc/gcc/cfgexpand.c:3618
0xb0dca8 expand_gimple_stmt
        /export/users/ienkovic/issues/common/gcc/gcc/cfgexpand.c:3714
0xb14db9 expand_gimple_basic_block
        /export/users/ienkovic/issues/common/gcc/gcc/cfgexpand.c:5720
0xb168b9 execute
        /export/users/ienkovic/issues/common/gcc/gcc/cfgexpand.c:6335
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

Reply via email to