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

            Bug ID: 98103
           Summary: [10/11 Regression] ICE tree check: expected tree that
                    contains 'decl minimal' structure, have 'integer_cst'
                    in cxx_eval_dynamic_cast_fn, at cp/constexpr.c:2003
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

Using testfile gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic17.C
This changed between 20191215 and 20200105 :


$ g++-11-20201129 -c constexpr-dynamic17.C -std=gnu++2a -fsanitize=vptr
constexpr-dynamic17.C:20:13:   in 'constexpr' expansion of '((D*)(&
d))->D::D()'
constexpr-dynamic17.C:12:35:   in 'constexpr' expansion of
'((D*)this)->D::<anonymous>.B::B((&(&((D*)this)->D::<anonymous>)->A::<anonymous>),
(&((D*)this)->D::<anonymous>))'
constexpr-dynamic17.C:20:13: internal compiler error: tree check: expected tree
that contains 'decl minimal' structure, have 'integer_cst' in
cxx_eval_dynamic_cast_fn, at cp/constexpr.c:2003
   20 | constexpr D d;
      |             ^
0x64d1b5 tree_contains_struct_check_failed(tree_node const*,
tree_node_structure_enum, char const*, int, char const*)
        ../../gcc/tree.c:9984
0x6ebbe3 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
        ../../gcc/tree.h:3445
0x6ebbe3 cxx_eval_dynamic_cast_fn
        ../../gcc/cp/constexpr.c:2003
0x6ebbe3 cxx_eval_call_expression
        ../../gcc/cp/constexpr.c:2421
0x6eec61 cxx_eval_constant_expression
        ../../gcc/cp/constexpr.c:5866
0x6ed3de cxx_eval_constant_expression
        ../../gcc/cp/constexpr.c:6358
0x6ed3de cxx_eval_constant_expression
        ../../gcc/cp/constexpr.c:6358
0x6eeb2a cxx_eval_constant_expression
        ../../gcc/cp/constexpr.c:6305
0x6ed39a cxx_eval_constant_expression
        ../../gcc/cp/constexpr.c:6176
0x6eebda cxx_eval_constant_expression
        ../../gcc/cp/constexpr.c:6044
0x6ee1ee cxx_eval_statement_list
        ../../gcc/cp/constexpr.c:5436
0x6ee1ee cxx_eval_constant_expression
        ../../gcc/cp/constexpr.c:6502
0x6eea4e cxx_eval_constant_expression
        ../../gcc/cp/constexpr.c:6537
0x6ee1ee cxx_eval_statement_list
        ../../gcc/cp/constexpr.c:5436
0x6ee1ee cxx_eval_constant_expression
        ../../gcc/cp/constexpr.c:6502
0x6eb576 cxx_eval_call_expression
        ../../gcc/cp/constexpr.c:2687
0x6eec61 cxx_eval_constant_expression
        ../../gcc/cp/constexpr.c:5866
0x6ed39a cxx_eval_constant_expression
        ../../gcc/cp/constexpr.c:6176
0x6eebda cxx_eval_constant_expression
        ../../gcc/cp/constexpr.c:6044
0x6ee1ee cxx_eval_statement_list
        ../../gcc/cp/constexpr.c:5436

Reply via email to