public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/64129] New: [5.0 regression] ICE on invalid: in grokfndecl, at cp/decl.c:7658
@ 2014-11-30 20:22 dimhen at gmail dot com
  2014-12-02 12:10 ` [Bug c++/64129] " redi at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: dimhen at gmail dot com @ 2014-11-30 20:22 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 64129
           Summary: [5.0 regression] ICE on invalid: in grokfndecl, at
                    cp/decl.c:7658
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dimhen at gmail dot com

r218182 FAIL
r214718 FAIL (different stack)
r214134 PASS

$ cat x.ii
template <0> int __copy_streambufs_eof;
class {
    friend __copy_streambufs_eof <> (

$ /usr/local/gcc_current/bin/g++ -fpreprocessed -fsyntax-only x.ii
x.ii:1:11: error: expected identifier before numeric constant
 template <0> int __copy_streambufs_eof;
           ^
x.ii:1:11: error: expected '>' before numeric constant
x.ii:1:18: warning: variable templates only available with -std=c++14 or
-std=gnu++14
 template <0> int __copy_streambufs_eof;
                  ^
x.ii:3:35: error: wrong number of template arguments (0, should be 1)
     friend __copy_streambufs_eof <> (
                                   ^
x.ii:1:18: note: provided for 'template<int <anonymous> > int
__copy_streambufs_eof<<anonymous> >'
 template <0> int __copy_streambufs_eof;
                  ^
x.ii:3:37: error: expected identifier at end of input
     friend __copy_streambufs_eof <> (
                                     ^
x.ii:3:37: error: expected ',' or '...' at end of input
x.ii:3:37: error: expected ')' at end of input
x.ii:3:37: error: ISO C++ forbids declaration of '__copy_streambufs_eof' with
no type [-fpermissive]
x.ii:3:37: internal compiler error: in grokfndecl, at cp/decl.c:7658
0x5eb4c5 grokfndecl
    /home/dimhen/src/gcc_current/gcc/cp/decl.c:7658
0x5e01c9 grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*,
decl_context, int, tree_node**)
    /home/dimhen/src/gcc_current/gcc/cp/decl.c:10716
0x68d006 grokfield(cp_declarator const*, cp_decl_specifier_seq*, tree_node*,
bool, tree_node*, tree_node*)
    /home/dimhen/src/gcc_current/gcc/cp/decl2.c:875
0x6cfd2d cp_parser_member_declaration
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:20992
0x6abb05 cp_parser_member_specification_opt
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:20544
0x6abb05 cp_parser_class_specifier_1
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:19736
0x6abb05 cp_parser_class_specifier
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:19972
0x6abb05 cp_parser_type_specifier
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:14632
0x6ae33f cp_parser_decl_specifier_seq
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:11867
0x6ce139 cp_parser_simple_declaration
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:11457
0x6ce693 cp_parser_block_declaration
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:11406
0x6af939 cp_parser_declaration
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:11303
0x6dbe7a cp_parser_declaration_seq_opt
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:11189
0x6dc1b7 cp_parser_translation_unit
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:4101
0x6dc1b7 c_parse_file()
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:32199
0x8124a2 c_common_parse_file()
    /home/dimhen/src/gcc_current/gcc/c-family/c-opts.c:1039
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

$ /usr/local/gcc_current/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/usr/local/gcc_current/bin/gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc_current/libexec/gcc/x86_64-unknown-linux-gnu/5.0.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /home/dimhen/src/gcc_current/configure
--prefix=/usr/local/gcc_current/ --enable-checking=yes,df,rtl
--enable-languages=c,c++,lto --enable-plugin=yes --enable-static
Thread model: posix
gcc version 5.0.0 20141129 (experimental) [trunk revision 218182] (GCC)


$ ~/bin/gcc_214718/bin/g++ -fpreprocessed -fsyntax-only x.ii
x.ii:1:11: error: expected identifier before numeric constant
 template <0> int __copy_streambufs_eof;
           ^
x.ii:1:11: error: expected '>' before numeric constant
x.ii:1:18: warning: variable templates only available with -std=c++14 or
-std=gnu++14
 template <0> int __copy_streambufs_eof;
                  ^
x.ii:3:35: internal compiler error: Segmentation fault
     friend __copy_streambufs_eof <> (
                                   ^
0xc6025f crash_signal
    /home/dimhen/src/gcc_current/gcc/toplev.c:339
0x5d1dee uses_template_parms(tree_node*)
    /home/dimhen/src/gcc_current/gcc/cp/pt.c:8239
0x5d3a93 lookup_template_variable(tree_node*, tree_node*)
    /home/dimhen/src/gcc_current/gcc/cp/pt.c:7978
0x697c0a cp_parser_template_id
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:13636
0x697d95 cp_parser_class_name
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:19386
0x68bfd9 cp_parser_qualifying_entity
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:5564
0x68bfd9 cp_parser_nested_name_specifier_opt
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:5289
0x69af2b cp_parser_constructor_declarator_p
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:22870
0x69af2b cp_parser_decl_specifier_seq
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:11733
0x6a1636 cp_parser_member_declaration
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:20477
0x67fe4c cp_parser_member_specification_opt
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:20332
0x67fe4c cp_parser_class_specifier_1
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:19522
0x682860 cp_parser_class_specifier
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:19758
0x682860 cp_parser_type_specifier
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:14507
0x69adb4 cp_parser_decl_specifier_seq
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:11748
0x6a0d69 cp_parser_simple_declaration
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:11338
0x684a93 cp_parser_block_declaration
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:11287
0x6ab465 cp_parser_declaration
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:11184
0x6aa118 cp_parser_declaration_seq_opt
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:11070
0x6ab9b3 cp_parser_translation_unit
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:4053
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

$ ~/bin/gcc_214718/bin/g++ -v
Using built-in specs.
COLLECT_GCC=/home/dimhen/bin/gcc_214718/bin/g++
COLLECT_LTO_WRAPPER=/home/dimhen/bin/gcc_214718/bin/../libexec/gcc/x86_64-unknown-linux-gnu/5.0.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /home/dimhen/src/gcc_current/configure
--prefix=/usr/local/gcc_current/ --enable-checking=yes,df,rtl,tree,fold
--enable-languages=c,c++,lto --enable-plugin=yes --enable-static
Thread model: posix
gcc version 5.0.0 20140829 (experimental) [trunk revision 214718] (GCC)


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

* [Bug c++/64129] [5.0 regression] ICE on invalid: in grokfndecl, at cp/decl.c:7658
  2014-11-30 20:22 [Bug c++/64129] New: [5.0 regression] ICE on invalid: in grokfndecl, at cp/decl.c:7658 dimhen at gmail dot com
@ 2014-12-02 12:10 ` redi at gcc dot gnu.org
  2014-12-02 13:56 ` redi at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2014-12-02 12:10 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2014-12-02
     Ever confirmed|0                           |1

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
> Please submit a full bug report,
> with preprocessed source if appropriate.
> Please include the complete backtrace with any bug report.
> See <http://gcc.gnu.org/bugs.html> for instructions.


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

* [Bug c++/64129] [5.0 regression] ICE on invalid: in grokfndecl, at cp/decl.c:7658
  2014-11-30 20:22 [Bug c++/64129] New: [5.0 regression] ICE on invalid: in grokfndecl, at cp/decl.c:7658 dimhen at gmail dot com
  2014-12-02 12:10 ` [Bug c++/64129] " redi at gcc dot gnu.org
@ 2014-12-02 13:56 ` redi at gcc dot gnu.org
  2014-12-09 17:53 ` jason at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2014-12-02 13:56 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code
             Status|WAITING                     |NEW
      Known to work|                            |4.9.2

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Ah sorry I didn't realise that was the whole thing.


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

* [Bug c++/64129] [5.0 regression] ICE on invalid: in grokfndecl, at cp/decl.c:7658
  2014-11-30 20:22 [Bug c++/64129] New: [5.0 regression] ICE on invalid: in grokfndecl, at cp/decl.c:7658 dimhen at gmail dot com
  2014-12-02 12:10 ` [Bug c++/64129] " redi at gcc dot gnu.org
  2014-12-02 13:56 ` redi at gcc dot gnu.org
@ 2014-12-09 17:53 ` jason at gcc dot gnu.org
  2014-12-10  2:51 ` jason at gcc dot gnu.org
  2014-12-10  4:32 ` jason at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2014-12-09 17:53 UTC (permalink / raw)
  To: gcc-bugs

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

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

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


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

* [Bug c++/64129] [5.0 regression] ICE on invalid: in grokfndecl, at cp/decl.c:7658
  2014-11-30 20:22 [Bug c++/64129] New: [5.0 regression] ICE on invalid: in grokfndecl, at cp/decl.c:7658 dimhen at gmail dot com
                   ` (2 preceding siblings ...)
  2014-12-09 17:53 ` jason at gcc dot gnu.org
@ 2014-12-10  2:51 ` jason at gcc dot gnu.org
  2014-12-10  4:32 ` jason at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2014-12-10  2:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Wed Dec 10 02:51:03 2014
New Revision: 218557

URL: https://gcc.gnu.org/viewcvs?rev=218557&root=gcc&view=rev
Log:
    PR c++/64129
    * decl.c (grokdeclarator): Recover from variable template
    specialization declared as function.

Added:
    trunk/gcc/testsuite/g++.dg/parse/error56.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/decl.c


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

* [Bug c++/64129] [5.0 regression] ICE on invalid: in grokfndecl, at cp/decl.c:7658
  2014-11-30 20:22 [Bug c++/64129] New: [5.0 regression] ICE on invalid: in grokfndecl, at cp/decl.c:7658 dimhen at gmail dot com
                   ` (3 preceding siblings ...)
  2014-12-10  2:51 ` jason at gcc dot gnu.org
@ 2014-12-10  4:32 ` jason at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2014-12-10  4:32 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |5.0

--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed.


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

end of thread, other threads:[~2014-12-10  4:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-30 20:22 [Bug c++/64129] New: [5.0 regression] ICE on invalid: in grokfndecl, at cp/decl.c:7658 dimhen at gmail dot com
2014-12-02 12:10 ` [Bug c++/64129] " redi at gcc dot gnu.org
2014-12-02 13:56 ` redi at gcc dot gnu.org
2014-12-09 17:53 ` jason at gcc dot gnu.org
2014-12-10  2:51 ` jason at gcc dot gnu.org
2014-12-10  4:32 ` 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).