public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/60186] New: [4.9 Regression] [c++11] ICE with invalid value in constexpr array initializer
@ 2014-02-13 22:41 reichelt at gcc dot gnu.org
  2014-02-13 22:41 ` [Bug c++/60186] " reichelt at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-02-13 22:41 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60186

            Bug ID: 60186
           Summary: [4.9 Regression] [c++11] ICE with invalid value in
                    constexpr array initializer
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: reichelt at gcc dot gnu.org

The following invalid code snippet (compiled with "-std=c++11")
triggers an ICE on trunk:

=========================================
template<typename> void foo(int i)
{
  constexpr int a[] = { i };
}
=========================================

bug.cc: In function 'void foo(int)':
bug.cc:3:27: internal compiler error: unexpected expression 'i' of kind
implicit_conv_expr
   constexpr int a[] = { i };
                           ^
0x73e03f cxx_eval_constant_expression
        ../../gcc/gcc/cp/semantics.c:9787
0x741085 cxx_eval_outermost_constant_expr
        ../../gcc/gcc/cp/semantics.c:9807
0x743d1b maybe_constant_value(tree_node*)
        ../../gcc/gcc/cp/semantics.c:9917
0x7499a8 maybe_constant_init(tree_node*)
        ../../gcc/gcc/cp/semantics.c:9934
0x6506d4 process_init_constructor_array
        ../../gcc/gcc/cp/typeck2.c:1195
0x6506d4 process_init_constructor
        ../../gcc/gcc/cp/typeck2.c:1476
0x6506d4 digest_init_r
        ../../gcc/gcc/cp/typeck2.c:1053
0x651f2a digest_init_flags
        ../../gcc/gcc/cp/typeck2.c:1098
0x651f2a store_init_value(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>**, int)
        ../../gcc/gcc/cp/typeck2.c:786
0x5c7195 check_initializer
        ../../gcc/gcc/cp/decl.c:5777
0x5d9ef0 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
        ../../gcc/gcc/cp/decl.c:6293
0x6c816d cp_parser_init_declarator
        ../../gcc/gcc/cp/parser.c:16815
0x6c9929 cp_parser_simple_declaration
        ../../gcc/gcc/cp/parser.c:11205
0x6acc13 cp_parser_block_declaration
        ../../gcc/gcc/cp/parser.c:11086
0x6add31 cp_parser_declaration_statement
        ../../gcc/gcc/cp/parser.c:10733
0x6ae37b cp_parser_statement
        ../../gcc/gcc/cp/parser.c:9467
0x6af169 cp_parser_statement_seq_opt
        ../../gcc/gcc/cp/parser.c:9745
0x6af2d6 cp_parser_compound_statement
        ../../gcc/gcc/cp/parser.c:9699
0x6c34ab cp_parser_function_body
        ../../gcc/gcc/cp/parser.c:18641
0x6c34ab cp_parser_ctor_initializer_opt_and_function_body
        ../../gcc/gcc/cp/parser.c:18677
Please submit a full bug report, [etc.]

The regression was introduced between 2014-01-14 and 2014-01-21.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-02-22  5:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-13 22:41 [Bug c++/60186] New: [4.9 Regression] [c++11] ICE with invalid value in constexpr array initializer reichelt at gcc dot gnu.org
2014-02-13 22:41 ` [Bug c++/60186] " reichelt at gcc dot gnu.org
2014-02-14  7:50 ` jakub at gcc dot gnu.org
2014-02-21 19:04 ` jason at gcc dot gnu.org
2014-02-21 21:49 ` jason at gcc dot gnu.org
2014-02-22  5:04 ` jason at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).