public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gscfq@t-online.de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/98355] New: [9/10/11 Regression] ICE in has_attribute, at c-family/c-attribs.c:5628
Date: Thu, 17 Dec 2020 16:51:10 +0000	[thread overview]
Message-ID: <bug-98355-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 98355
           Summary: [9/10/11 Regression] ICE in has_attribute, at
                    c-family/c-attribs.c:5628
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Started to ICE with version r9, roundabout 20181125 :


$ cat z1.cc
struct S { int a; };
template <int> struct T
{
  static_assert (__builtin_has_attribute (((S*)0) -> a, packed));
};


$ g++-11-20201213 -c z1.cc
z1.cc:4:57: internal compiler error: Segmentation fault
    4 |   static_assert (__builtin_has_attribute (((S*)0) -> a, packed));
      |                                                         ^~~~~~
0xc8f5ff crash_signal
        ../../gcc/toplev.c:327
0x841f52 has_attribute(unsigned int, tree_node*, tree_node*, tree_node*
(*)(tree_node*))
        ../../gcc/c-family/c-attribs.c:5628
0x7525ed cp_parser_has_attribute_expression
        ../../gcc/cp/parser.c:8936
0x7525ed cp_parser_unary_expression
        ../../gcc/cp/parser.c:8527
0x72b84f cp_parser_cast_expression
        ../../gcc/cp/parser.c:9712
0x72c082 cp_parser_binary_expression
        ../../gcc/cp/parser.c:9814
0x72c7e0 cp_parser_assignment_expression
        ../../gcc/cp/parser.c:10118
0x72dcbd cp_parser_constant_expression
        ../../gcc/cp/parser.c:10414
0x72f7d2 cp_parser_static_assert
        ../../gcc/cp/parser.c:15319
0x75d23c cp_parser_member_declaration
        ../../gcc/cp/parser.c:25844
0x73774e cp_parser_member_specification_opt
        ../../gcc/cp/parser.c:25712
0x73774e cp_parser_class_specifier_1
        ../../gcc/cp/parser.c:24801
0x739639 cp_parser_class_specifier
        ../../gcc/cp/parser.c:25112
0x739639 cp_parser_type_specifier
        ../../gcc/cp/parser.c:18368
0x73a0b6 cp_parser_decl_specifier_seq
        ../../gcc/cp/parser.c:14990
0x75bd05 cp_parser_single_declaration
        ../../gcc/cp/parser.c:30321
0x75c095 cp_parser_template_declaration_after_parameters
        ../../gcc/cp/parser.c:29984
0x75c84b cp_parser_explicit_template_declaration
        ../../gcc/cp/parser.c:30250
0x75c84b cp_parser_template_declaration_after_export
        ../../gcc/cp/parser.c:30269
0x75ecf9 cp_parser_declaration
        ../../gcc/cp/parser.c:13996

             reply	other threads:[~2020-12-17 16:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-17 16:51 gscfq@t-online.de [this message]
2020-12-17 17:25 ` [Bug c++/98355] " msebor at gcc dot gnu.org
2021-01-05  8:34 ` rguenth at gcc dot gnu.org
2021-01-14 11:13 ` rguenth at gcc dot gnu.org
2021-01-19 14:59 ` jakub at gcc dot gnu.org
2021-01-19 16:33 ` msebor at gcc dot gnu.org
2021-01-29  4:41 ` mpolacek at gcc dot gnu.org
2021-01-29 16:34 ` mpolacek at gcc dot gnu.org
2021-02-01 15:21 ` cvs-commit at gcc dot gnu.org
2021-02-01 15:22 ` [Bug c++/98355] [9/10 " mpolacek at gcc dot gnu.org
2021-02-01 15:23 ` cvs-commit at gcc dot gnu.org
2021-02-01 15:23 ` [Bug c++/98355] [9 " mpolacek at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-98355-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).