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/109412] New: [13 Regression] ICE in fold_convert_loc, at fold-const.cc:2627
Date: Tue, 04 Apr 2023 16:12:01 +0000	[thread overview]
Message-ID: <bug-109412-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 109412
           Summary: [13 Regression] ICE in fold_convert_loc, at
                    fold-const.cc:2627
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Started between 20220821 and 20220828 :
(derived from c-c++-common/ubsan/bounds-21.c)


$ cat z1.c
int i;
int foo (void) { return ++i; }
int
main ()
{
  char a() = {};
  a[foo ()] = a[foo()] | 'a';
  if (i != 2)
    __builtin_abort ();
  a[foo()] |= 'a';
  if (i != 3)
    __builtin_abort ();
}


$ gcc-13-20230402 -c z1.c
z1.c: In function 'main':
z1.c:6:3: error: function 'a' is initialized like a variable
    6 |   char a() = {};
      |   ^~~~
z1.c:6:3: internal compiler error: in fold_convert_loc, at fold-const.cc:2627
0xa76ede fold_convert_loc(unsigned int, tree_node*, tree_node*)
        ../../gcc/fold-const.cc:2627
0x7741de pop_init_level(unsigned int, int, obstack*, unsigned int)
        ../../gcc/c/c-typeck.cc:9382
0x7a7f8e c_parser_braced_init
        ../../gcc/c/c-parser.cc:5775
0x7a9651 c_parser_initializer
        ../../gcc/c/c-parser.cc:5675
0x7c3ec8 c_parser_declaration_or_fndef
        ../../gcc/c/c-parser.cc:2564
0x7c293b c_parser_compound_statement_nostart
        ../../gcc/c/c-parser.cc:6208
0x7c2d83 c_parser_compound_statement
        ../../gcc/c/c-parser.cc:6105
0x7c4d7f c_parser_declaration_or_fndef
        ../../gcc/c/c-parser.cc:2841
0x7cf0af c_parser_external_declaration
        ../../gcc/c/c-parser.cc:1925
0x7cf9ed c_parser_translation_unit
        ../../gcc/c/c-parser.cc:1779
0x7cf9ed c_parse_file()
        ../../gcc/c/c-parser.cc:24632
0x84a4e1 c_common_parse_file()
        ../../gcc/c-family/c-opts.cc:1248

             reply	other threads:[~2023-04-04 16:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-04 16:12 gscfq@t-online.de [this message]
2023-04-04 16:39 ` [Bug c/109412] " mpolacek at gcc dot gnu.org
2023-04-04 17:19 ` joseph at codesourcery dot com
2023-04-13 10:29 ` jakub at gcc dot gnu.org
2023-04-26  6:58 ` [Bug c/109412] [13/14 " rguenth at gcc dot gnu.org
2023-04-27  2:05 ` [Bug c/109412] [13/14 Regression] ICE in fold_convert_loc, at fold-const.cc:2627 since r13-2205-g14cfa01755a66a sjames at gcc dot gnu.org
2023-04-27  9:36 ` cvs-commit at gcc dot gnu.org
2023-04-27  9:41 ` cvs-commit at gcc dot gnu.org
2023-04-27  9:42 ` jakub 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-109412-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).