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 c++/81942] New: ICE on empty constexpr constructor with C++14


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

            Bug ID: 81942
           Summary: ICE on empty constexpr constructor with C++14
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: thopre01 at gcc dot gnu.org
  Target Milestone: ---
            Target: arm-none-eabi

Hi,

The following testcase ICEs on arm-none-eabi targets when compiled for C++14:

** foo.cc **

class A {
public:
    constexpr A() {
        return;
    }
};

A mwi;


%arm-none-eabi-gcc -c -std=c++14 foo.cc

foo.cc:8:3:   in constexpr expansion of 'mwi.A::A()'
foo.cc:8:3: internal compiler error: in cxx_eval_constant_expression, at
cp/constexpr.c:4556
 A mwi;
   ^~~
0x83d1f1 cxx_eval_constant_expression
        gcc/cp/constexpr.c:4556
0x839e25 cxx_eval_statement_list
        gcc/cp/constexpr.c:3770
0x83cdc8 cxx_eval_constant_expression
        gcc/cp/constexpr.c:4497
0x83ce47 cxx_eval_constant_expression
        gcc/cp/constexpr.c:4503
0x839e25 cxx_eval_statement_list
        gcc/cp/constexpr.c:3770
0x83cdc8 cxx_eval_constant_expression
        gcc/cp/constexpr.c:4497
0x830d1b cxx_eval_call_expression
        gcc/cp/constexpr.c:1661
0x83ae52 cxx_eval_constant_expression
        gcc/cp/constexpr.c:4035
0x83d7ec cxx_eval_outermost_constant_expr
        gcc/cp/constexpr.c:4668
0x83ea0a maybe_constant_init(tree_node*, tree_node*)
        gcc/cp/constexpr.c:4990
0x90602e expand_default_init
        gcc/cp/init.c:1869
0x90655a expand_aggr_init_1
        gcc/cp/init.c:1972
0x905264 build_aggr_init(tree_node*, tree_node*, int, int)
        gcc/cp/init.c:1713
0x899e1d build_aggr_init_full_exprs
        gcc/cp/decl.c:6094
0x89ac40 check_initializer
        gcc/cp/decl.c:6242
0x89e482 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
        gcc/cp/decl.c:6961
0x992889 cp_parser_init_declarator
        gcc/cp/parser.c:19674
0x985cd0 cp_parser_simple_declaration
        gcc/cp/parser.c:13059
0x9857dc cp_parser_block_declaration
        gcc/cp/parser.c:12877
0x98553b cp_parser_declaration
        gcc/cp/parser.c:12774

Best regards.

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