public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/60250] New: [4.9 Regression] [c++1y] ICE using lambda for array size
@ 2014-02-17 21:27 reichelt at gcc dot gnu.org
  2014-02-17 21:27 ` [Bug c++/60250] " reichelt at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-02-17 21:27 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60250
           Summary: [4.9 Regression] [c++1y] ICE using lambda for array
                    size
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: reichelt at gcc dot gnu.org

The following valid code snippet (compiled with "-std=c++1y") triggers
an ICE on trunk. The code compiles fine, if it is compiled with
"-std=c++11".

====================================
template<typename> void foo()
{
  typedef int T[ ([](){ return 1; }()) ];
}
====================================

bug.cc: In function 'void foo()':
bug.cc:3:40: internal compiler error: Segmentation fault
   typedef int T[ ([](){ return 1; }()) ];
                                        ^
0xba529f crash_signal
        ../../gcc/gcc/toplev.c:337
0x7422dd potential_constant_expression_1
        ../../gcc/gcc/cp/semantics.c:10140
0x741680 potential_constant_expression_1
        ../../gcc/gcc/cp/semantics.c:10495
0x74d0dd array_of_runtime_bound_p(tree_node*)
        ../../gcc/gcc/cp/tree.c:892
0x5e9656 grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*,
decl_context, int, tree_node**)
        ../../gcc/gcc/cp/decl.c:10174
0x5edc24 start_decl(cp_declarator const*, cp_decl_specifier_seq*, int,
tree_node*, tree_node*, tree_node**)
        ../../gcc/gcc/cp/decl.c:4508
0x6c7e8e cp_parser_init_declarator
        ../../gcc/gcc/cp/parser.c:16680
0x6c9919 cp_parser_simple_declaration
        ../../gcc/gcc/cp/parser.c:11205
0x6acc03 cp_parser_block_declaration
        ../../gcc/gcc/cp/parser.c:11086
0x6add21 cp_parser_declaration_statement
        ../../gcc/gcc/cp/parser.c:10733
0x6ae36b cp_parser_statement
        ../../gcc/gcc/cp/parser.c:9467
0x6af159 cp_parser_statement_seq_opt
        ../../gcc/gcc/cp/parser.c:9745
0x6af2c6 cp_parser_compound_statement
        ../../gcc/gcc/cp/parser.c:9699
0x6c349b cp_parser_function_body
        ../../gcc/gcc/cp/parser.c:18641
0x6c349b cp_parser_ctor_initializer_opt_and_function_body
        ../../gcc/gcc/cp/parser.c:18677
0x6c77e2 cp_parser_function_definition_after_declarator
        ../../gcc/gcc/cp/parser.c:22792
0x6c8681 cp_parser_function_definition_from_specifiers_and_declarator
        ../../gcc/gcc/cp/parser.c:22704
0x6c8681 cp_parser_init_declarator
        ../../gcc/gcc/cp/parser.c:16585
0x6c8a1a cp_parser_single_declaration
        ../../gcc/gcc/cp/parser.c:23113
0x6c8d04 cp_parser_template_declaration_after_export
        ../../gcc/gcc/cp/parser.c:22915
Please submit a full bug report, [etc.]


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

* [Bug c++/60250] [4.9 Regression] [c++1y] ICE using lambda for array size
  2014-02-17 21:27 [Bug c++/60250] New: [4.9 Regression] [c++1y] ICE using lambda for array size reichelt at gcc dot gnu.org
@ 2014-02-17 21:27 ` reichelt at gcc dot gnu.org
  2014-02-18  9:25 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-02-17 21:27 UTC (permalink / raw)
  To: gcc-bugs

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

Volker Reichelt <reichelt at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.8.0
   Target Milestone|---                         |4.9.0
      Known to fail|                            |4.9.0


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

* [Bug c++/60250] [4.9 Regression] [c++1y] ICE using lambda for array size
  2014-02-17 21:27 [Bug c++/60250] New: [4.9 Regression] [c++1y] ICE using lambda for array size reichelt at gcc dot gnu.org
  2014-02-17 21:27 ` [Bug c++/60250] " reichelt at gcc dot gnu.org
@ 2014-02-18  9:25 ` rguenth at gcc dot gnu.org
  2014-02-21  4:47 ` jason at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-02-18  9:25 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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

* [Bug c++/60250] [4.9 Regression] [c++1y] ICE using lambda for array size
  2014-02-17 21:27 [Bug c++/60250] New: [4.9 Regression] [c++1y] ICE using lambda for array size reichelt at gcc dot gnu.org
  2014-02-17 21:27 ` [Bug c++/60250] " reichelt at gcc dot gnu.org
  2014-02-18  9:25 ` rguenth at gcc dot gnu.org
@ 2014-02-21  4:47 ` jason at gcc dot gnu.org
  2014-02-21  4:48 ` jason at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2014-02-21  4:47 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |jason at gcc dot gnu.org


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

* [Bug c++/60250] [4.9 Regression] [c++1y] ICE using lambda for array size
  2014-02-17 21:27 [Bug c++/60250] New: [4.9 Regression] [c++1y] ICE using lambda for array size reichelt at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2014-02-21  4:47 ` jason at gcc dot gnu.org
@ 2014-02-21  4:48 ` jason at gcc dot gnu.org
  2014-02-21 14:02 ` jason at gcc dot gnu.org
  2014-02-21 14:31 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2014-02-21  4:48 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|ice-on-valid-code           |ice-on-invalid-code

--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> ---
Invalid, forming a typedef of array of runtime bound.


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

* [Bug c++/60250] [4.9 Regression] [c++1y] ICE using lambda for array size
  2014-02-17 21:27 [Bug c++/60250] New: [4.9 Regression] [c++1y] ICE using lambda for array size reichelt at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2014-02-21  4:48 ` jason at gcc dot gnu.org
@ 2014-02-21 14:02 ` jason at gcc dot gnu.org
  2014-02-21 14:31 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2014-02-21 14:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Fri Feb 21 14:01:29 2014
New Revision: 207996

URL: http://gcc.gnu.org/viewcvs?rev=207996&root=gcc&view=rev
Log:
    PR c++/60250
    * parser.c (cp_parser_direct_declarator): Don't wrap a
    type-dependent expression in a NOP_EXPR.

Added:
    trunk/gcc/testsuite/g++.dg/cpp1y/vla12.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/parser.c


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

* [Bug c++/60250] [4.9 Regression] [c++1y] ICE using lambda for array size
  2014-02-17 21:27 [Bug c++/60250] New: [4.9 Regression] [c++1y] ICE using lambda for array size reichelt at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2014-02-21 14:02 ` jason at gcc dot gnu.org
@ 2014-02-21 14:31 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-02-21 14:31 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.


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

end of thread, other threads:[~2014-02-21 14:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-17 21:27 [Bug c++/60250] New: [4.9 Regression] [c++1y] ICE using lambda for array size reichelt at gcc dot gnu.org
2014-02-17 21:27 ` [Bug c++/60250] " reichelt at gcc dot gnu.org
2014-02-18  9:25 ` rguenth at gcc dot gnu.org
2014-02-21  4:47 ` jason at gcc dot gnu.org
2014-02-21  4:48 ` jason at gcc dot gnu.org
2014-02-21 14:02 ` jason at gcc dot gnu.org
2014-02-21 14:31 ` jakub 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).