public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/96364] New: ICE on valid code in cp_finish_decl, at cp/decl.c:7537
@ 2020-07-29  2:31 haoxintu at gmail dot com
  2020-08-03 19:58 ` [Bug c++/96364] " mpolacek at gcc dot gnu.org
  2023-01-30 23:03 ` [Bug c++/96364] ICE on valid code in cp_finish_decl with auto return type and double attributes pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: haoxintu at gmail dot com @ 2020-07-29  2:31 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 96364
           Summary: ICE on valid code in cp_finish_decl, at cp/decl.c:7537
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: haoxintu at gmail dot com
  Target Milestone: ---

Hi, all.

Weirdly, this simple valid code makes GCC ICE (clang,icc,or msvc accepts this
code).

Input:
//small.cc
auto a[[]] [[]]();

Command:
g++ small.cc

Output:
small.cc:1:17: internal compiler error: in cp_finish_decl, at cp/decl.c:7536
    1 | auto a[[]] [[]]();
      |                 ^
0x63f6dc cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
        ../../gcc/cp/decl.c:7536
0x9ed9b9 cp_parser_init_declarator
        ../../gcc/cp/parser.c:20990
0x9cdacc cp_parser_simple_declaration
        ../../gcc/cp/parser.c:13799
0x9f8d2e cp_parser_declaration
        ../../gcc/cp/parser.c:13498
0x9f941b cp_parser_translation_unit
        ../../gcc/cp/parser.c:4781
0x9f941b c_parse_file()
        ../../gcc/cp/parser.c:44069
0xb13e2d c_common_parse_file()
        ../../gcc/c-family/c-opts.c:1188
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

I have tested this in GCC-7.1 onwards versions, and they all behave the same.

Thanks,
Haoxin

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

end of thread, other threads:[~2023-01-30 23:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-29  2:31 [Bug c++/96364] New: ICE on valid code in cp_finish_decl, at cp/decl.c:7537 haoxintu at gmail dot com
2020-08-03 19:58 ` [Bug c++/96364] " mpolacek at gcc dot gnu.org
2023-01-30 23:03 ` [Bug c++/96364] ICE on valid code in cp_finish_decl with auto return type and double attributes pinskia 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).