public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Martin Sebor <msebor@gmail.com>
To: Gcc Patch List <gcc-patches@gcc.gnu.org>, Jeff Law <law@redhat.com>
Cc: Jakub Jelinek <jakub@redhat.com>
Subject: Re: [PATCH] use attribute exclusion to reject naked vs target_clones conflicts (PR 84723)
Date: Tue, 13 Mar 2018 02:12:00 -0000	[thread overview]
Message-ID: <6741ab89-75ec-61ef-cdf5-d84e7dd5d470@gmail.com> (raw)
In-Reply-To: <f24c8639-bedb-d420-812a-c8b75b1daf4d@gmail.com>

Since Jakub has committed an alternate patch that fixes
the ICE (below) this change is no longer necessary for GCC 8.
It still is in my view the right way to address the main part
of the problem so I will resubmit it for GCC 9 in stage 1.

https://gcc.gnu.org/ml/gcc-patches/2018-03/msg00285.html

Martin

On 03/06/2018 10:19 PM, Martin Sebor wrote:
> PR 84723 is about an ICE caused by GCC accepting the mutually
> exclusive attributes target_clones and naked during parsing,
> only to then later crash while assuming such conflicts don't
> happen.
>
> The attached patch adds an exclusion for the two attributes
> to detect when they're both specified on declarations of the
> same function and avoid the ICE that way (there are other
> problems with target_clones that are unrelated to other
> interaction with other attributes).
>
> As this is the first instance of an exclusion between a pair
> of a front/middle-end and back-end attributes, testing the
> straightforward solution of just adding an exclusion for them
> exposed a restriction in the implementation that required more
> extensive changes to make things work.  The current (unpatched)
> code requires exclusions to be symmetric (e.g., when there is
> an exclusion entry for target_clones and naked, there must also
> be another exclusion entry the other way around).  This makes
> sense for attributes in the same table (e.g., all C/C++
> attributes, or all i386 back-end attributes) but not between
> attributes in different tables.  The patch makes additional
> changes to allow asymmetric exclusions without compromising
> the detection of attribute conflicts.  This additional
> enhancement allowed me to remove the self tests.
>
> Since I started working on this last night Jakub has already
> posted an alternate fix that doesn't make use of the exclusion
> framework (plus it fixes the additional bugs/ICEs I referred
> to above).  This patch is thus meant to apply on top of Jakub's
> (the tests will need tweaking to adjust the expected diagnostics).
> If my solution is considered too invasive at this stage I'm fine
> holding off on it and re-posting it in stage 1.  While working
> on it I noticed other opportunities for improvements in this
> area that I would like to make then.
>
> Martin

      reply	other threads:[~2018-03-13  2:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-07  5:19 Martin Sebor
2018-03-13  2:12 ` Martin Sebor [this message]

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=6741ab89-75ec-61ef-cdf5-d84e7dd5d470@gmail.com \
    --to=msebor@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=law@redhat.com \
    /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).