public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/109412] [13/14 Regression] ICE in fold_convert_loc, at fold-const.cc:2627 since r13-2205-g14cfa01755a66a
Date: Thu, 27 Apr 2023 09:41:58 +0000	[thread overview]
Message-ID: <bug-109412-4-X18ekxXvkf@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-109412-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:7e312adcb70ca7d67f0c2cf238cddec9b3243ff9

commit r13-7257-g7e312adcb70ca7d67f0c2cf238cddec9b3243ff9
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Thu Apr 27 11:35:55 2023 +0200

    c: Fix up error-recovery on functions initialized as variables [PR109412]

    The change to allow empty initializers in C broke error-recovery on the
    following testcase.  We are emitting function %qD is initialized like a
    variable error early; if the initializer is non-empty, we just emit
    another error that the initializer is invalid.  Previously if it was empty,
    we'd emit another error that scalar is being initialized by empty
    initializer (not really correct), but now we instead just try to
    build_zero_cst for the FUNCTION_TYPE and ICE on it.

    The following patch just emits the same diagnostics for the empty
    initializers as we emit for the non-empty ones.

    2023-04-27  Jakub Jelinek  <jakub@redhat.com>

            PR c/107682
            PR c/109412
            * c-typeck.cc (pop_init_level): If constructor_type is
FUNCTION_TYPE,
            reject empty initializer as invalid.

            * gcc.dg/pr109412.c: New test.

    (cherry picked from commit a1030fbf70eef5b635e4fbb904ec7209ebd137ca)

  parent reply	other threads:[~2023-04-27  9:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-04 16:12 [Bug c/109412] New: [13 Regression] ICE in fold_convert_loc, at fold-const.cc:2627 gscfq@t-online.de
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 [this message]
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-X18ekxXvkf@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).