public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* [attribs.cc] ICE with 4x underscores
@ 2024-01-30 10:34 Amol Surati
  2024-01-30 12:25 ` Jonathan Wakely
  0 siblings, 1 reply; 3+ messages in thread
From: Amol Surati @ 2024-01-30 10:34 UTC (permalink / raw)
  To: gcc

Hello,

If a std attribute name is squeezed between 4x underscores,
the compiler (both 13.2 [1] and trunk [2]) experiences an ICE.
for e.g. when using [[____deprecated____]] int a;

But, [[____depreated____]] int a; (i.e. the char 'c' removed from the
spelling) does not cause ICE.

Clang does not crash.

Stack trace with ICE:

    <source>:1:1: internal compiler error: in decl_attributes, at attribs.cc:751
        1 | [[____deprecated____]] int a;
          | ^
    0x1b49b1e internal_error(char const*, ...)
    ???:0
    0x6f805c fancy_abort(char const*, int, char const*)
    ???:0
    0x70f62d decl_attributes(tree_node**, tree_node*, int, tree_node*)
    ???:0
    0x728c0e start_decl(c_declarator*, c_declspecs*, bool, tree_node*,
bool, unsigned int*)
    ???:0
    0x7865dd c_parse_file()
    ???:0
    0x7e60b9 c_common_parse_file()
    ???:0

Thank you,
Amol

[1] https://godbolt.org/z/6PaMd9n6x
[2] https://godbolt.org/z/fc48q5PTW

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

end of thread, other threads:[~2024-01-30 21:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-30 10:34 [attribs.cc] ICE with 4x underscores Amol Surati
2024-01-30 12:25 ` Jonathan Wakely
2024-01-30 21:49   ` Marek Polacek

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