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/94172] [arm-none-eabi] ICE in expand_debug_locations, at cfgexpand.c:5403
Date: Thu, 17 Sep 2020 14:25:29 +0000	[thread overview]
Message-ID: <bug-94172-4-5CWbWbFyz1@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-94172-4@http.gcc.gnu.org/bugzilla/>

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

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

https://gcc.gnu.org/g:cac1949a51e25360a7fd7dc8f473997b7ca048a9

commit r8-10470-gcac1949a51e25360a7fd7dc8f473997b7ca048a9
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Tue Mar 17 22:32:34 2020 +0100

    c: Handle C_TYPE_INCOMPLETE_VARS even for ENUMERAL_TYPEs [PR94172]

    The following testcases ICE, because they contain extern variable
    declarations with incomplete enum types that is later completed and after
    that those variables are accessed.  The ICEs are because the vars then may
have
    incorrect DECL_MODE etc., e.g. in the first case the var has SImode
    DECL_MODE (the guessed mode for the enum), but the enum then actually has
    DImode because its enumerators don't fit into unsigned int.

    The following patch fixes it by using C_TYPE_INCOMPLETE_VARS not just on
    incomplete struct/union types, but also incomplete enum types.
    TYPE_VFIELD can't be used as it is TYPE_MIN_VALUE on ENUMERAL_TYPE,
    thankfully TYPE_LANG_SLOT_1 has been used in the C FE only on
    FUNCTION_TYPEs.

    2020-03-17  Jakub Jelinek  <jakub@redhat.com>

            PR c/94172
            * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
            instead of TYPE_VFIELD, and support it on
{RECORD,UNION,ENUMERAL}_TYPE.
            (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on
FUNCTION_TYPEs.
            * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
            ENUMERAL_TYPEs.
            (finish_incomplete_vars): New function, moved from finish_struct. 
Use
            relayout_decl instead of layout_decl.
            (finish_struct): Remove obsolete comment about
C_TYPE_INCOMPLETE_VARS
            being TYPE_VFIELD.  Use finish_incomplete_vars.
            (finish_enum): Clear C_TYPE_INCOMPLETE_VARS.  Call
            finish_incomplete_vars.
            * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
            also on ENUMERAL_TYPEs.

            * gcc.dg/pr94172-1.c: New test.
            * gcc.dg/pr94172-2.c: New test.

    (cherry picked from commit 87ce34fa00cd6b87452d747235da40dfe5b6e00f)

  parent reply	other threads:[~2020-09-17 14:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-14  3:27 [Bug middle-end/94172] New: " dtaubert at atmosic dot com
2020-03-14  3:46 ` [Bug middle-end/94172] " pinskia at gcc dot gnu.org
2020-03-16 15:55 ` wilco at gcc dot gnu.org
2020-03-16 16:25 ` jakub at gcc dot gnu.org
2020-03-16 16:30 ` rearnsha at gcc dot gnu.org
2020-03-16 16:34 ` jakub at gcc dot gnu.org
2020-03-16 16:35 ` wilco at gcc dot gnu.org
2020-03-16 16:39 ` tnfchris at gcc dot gnu.org
2020-03-16 16:46 ` jakub at gcc dot gnu.org
2020-03-16 18:21 ` [Bug c/94172] " jakub at gcc dot gnu.org
2020-03-17 21:33 ` cvs-commit at gcc dot gnu.org
2020-03-18  7:55 ` jakub at gcc dot gnu.org
2020-04-07 19:03 ` cvs-commit at gcc dot gnu.org
2020-09-17 14:25 ` cvs-commit at gcc dot gnu.org [this message]
2020-09-17 17:19 ` 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-94172-4-5CWbWbFyz1@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).