public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58533] New: [c++1y] ICE with auto in function pointer
@ 2013-09-25 20:43 reichelt at gcc dot gnu.org
  2013-11-13  7:02 ` [Bug c++/58533] " reichelt at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-09-25 20:43 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 58533
           Summary: [c++1y] ICE with auto in function pointer
           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=gnu++1y") triggers an
ICE on trunk (4.9.0 20130922):

=========================
void foo()
{
  void (*fp)(auto);
}
=========================

bug.cc: In function 'void foo()':
bug.cc:3:18: error: template declaration of 'void (* fp)(__GenT0)'
   void (*fp)(auto);
                  ^
bug.cc: At global scope:
bug.cc:4:1: internal compiler error: in pop_binding, at cp/name-lookup.c:372
 }
 ^
0x6f246a pop_binding(tree_node*, tree_node*)
        ../../gcc/gcc/cp/name-lookup.c:372
0x549577 poplevel(int, int, int)
        ../../gcc/gcc/cp/decl.c:736
0x584488 end_template_decl()
        ../../gcc/gcc/cp/pt.c:3786
0x624dcb finish_fully_implicit_template
        ../../gcc/gcc/cp/parser.c:29032
0x6493a8 cp_parser_function_definition_after_declarator
        ../../gcc/gcc/cp/parser.c:22350
0x64a079 cp_parser_function_definition_from_specifiers_and_declarator
        ../../gcc/gcc/cp/parser.c:22254
0x64a079 cp_parser_init_declarator
        ../../gcc/gcc/cp/parser.c:16348
0x64a32f cp_parser_simple_declaration
        ../../gcc/gcc/cp/parser.c:10986
0x64c190 cp_parser_block_declaration
        ../../gcc/gcc/cp/parser.c:10867
0x6551ae cp_parser_declaration
        ../../gcc/gcc/cp/parser.c:10764
0x653f0d cp_parser_declaration_seq_opt
        ../../gcc/gcc/cp/parser.c:10650
0x6557e6 cp_parser_translation_unit
        ../../gcc/gcc/cp/parser.c:3939
0x6557e6 c_parse_file()
        ../../gcc/gcc/cp/parser.c:28893
0x768164 c_common_parse_file()
        ../../gcc/gcc/c-family/c-opts.c:1046
Please submit a full bug report, [etc.]


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

* [Bug c++/58533] [c++1y] ICE with auto in function pointer
  2013-09-25 20:43 [Bug c++/58533] New: [c++1y] ICE with auto in function pointer reichelt at gcc dot gnu.org
@ 2013-11-13  7:02 ` reichelt at gcc dot gnu.org
  2013-11-13 14:51 ` reichelt at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-11-13  7:02 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|error-recovery,             |ice-on-valid-code
                   |ice-on-invalid-code         |
                 CC|                            |adam at jessamine dot co.uk

--- Comment #1 from Volker Reichelt <reichelt at gcc dot gnu.org> ---
Adam, thanks to your patch (see PR58534 etc.), this is now also compiled.
Do you want to add a testcase for this one, too?


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

* [Bug c++/58533] [c++1y] ICE with auto in function pointer
  2013-09-25 20:43 [Bug c++/58533] New: [c++1y] ICE with auto in function pointer reichelt at gcc dot gnu.org
  2013-11-13  7:02 ` [Bug c++/58533] " reichelt at gcc dot gnu.org
@ 2013-11-13 14:51 ` reichelt at gcc dot gnu.org
  2013-11-14  8:26 ` abutcher at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-11-13 14:51 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|ice-on-valid-code           |error-recovery,
                   |                            |ice-on-invalid-code

--- Comment #2 from Volker Reichelt <reichelt at gcc dot gnu.org> ---
Sorry, it's not compiled but properly rejected now.


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

* [Bug c++/58533] [c++1y] ICE with auto in function pointer
  2013-09-25 20:43 [Bug c++/58533] New: [c++1y] ICE with auto in function pointer reichelt at gcc dot gnu.org
  2013-11-13  7:02 ` [Bug c++/58533] " reichelt at gcc dot gnu.org
  2013-11-13 14:51 ` reichelt at gcc dot gnu.org
@ 2013-11-14  8:26 ` abutcher at gcc dot gnu.org
  2013-11-15 10:16 ` paolo.carlini at oracle dot com
  2013-11-15 15:14 ` paolo.carlini at oracle dot com
  4 siblings, 0 replies; 6+ messages in thread
From: abutcher at gcc dot gnu.org @ 2013-11-14  8:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from abutcher at gcc dot gnu.org ---
Author: abutcher
Date: Thu Nov 14 08:26:21 2013
New Revision: 204776

URL: http://gcc.gnu.org/viewcvs?rev=204776&root=gcc&view=rev
Log:
Added testcase for 58533, fixed by rev 204714.

gcc/testsuite/
    PR c++/58533
    * g++.dg/cpp1y/pr58533.C: New testcase (fixed by r204714).

Added:
    trunk/gcc/testsuite/g++.dg/cpp1y/pr58533.C
Modified:
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/58533] [c++1y] ICE with auto in function pointer
  2013-09-25 20:43 [Bug c++/58533] New: [c++1y] ICE with auto in function pointer reichelt at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2013-11-14  8:26 ` abutcher at gcc dot gnu.org
@ 2013-11-15 10:16 ` paolo.carlini at oracle dot com
  2013-11-15 15:14 ` paolo.carlini at oracle dot com
  4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-11-15 10:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Seems fixed.


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

* [Bug c++/58533] [c++1y] ICE with auto in function pointer
  2013-09-25 20:43 [Bug c++/58533] New: [c++1y] ICE with auto in function pointer reichelt at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2013-11-15 10:16 ` paolo.carlini at oracle dot com
@ 2013-11-15 15:14 ` paolo.carlini at oracle dot com
  4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-11-15 15:14 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |4.9.0

--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Fixed.


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

end of thread, other threads:[~2013-11-15 15:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-25 20:43 [Bug c++/58533] New: [c++1y] ICE with auto in function pointer reichelt at gcc dot gnu.org
2013-11-13  7:02 ` [Bug c++/58533] " reichelt at gcc dot gnu.org
2013-11-13 14:51 ` reichelt at gcc dot gnu.org
2013-11-14  8:26 ` abutcher at gcc dot gnu.org
2013-11-15 10:16 ` paolo.carlini at oracle dot com
2013-11-15 15:14 ` paolo.carlini at oracle dot com

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).