public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: "Martin Liška" <mliska@suse.cz>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH 4/N] Do not ICE on an invalid input for MV.
Date: Tue, 14 Mar 2017 11:09:00 -0000	[thread overview]
Message-ID: <CAFiYyc1bnOPJ2LJBAz3Mz5wLm_oP=0Pytad+oU0oyR8_sWw37A@mail.gmail.com> (raw)
In-Reply-To: <5fce5d4b-fd4f-ebf2-a7a9-4c911d606bcc@suse.cz>

On Tue, Mar 14, 2017 at 11:24 AM, Martin Liška <mliska@suse.cz> wrote:
> Hello.
>
> This fixes ICE when one does not provide valid target names:
> __attribute__((target_clones("default,foo,bar")))
>
> In that situation I suggest to print:
>
> $ ./xgcc -B. /tmp/mvc-ice.c
> /tmp/mvc-ice.c:6:1: error: attribute(target("foo")) is unknown
>  foo ()
>  ^~~
> /tmp/mvc-ice.c:6:1: error: attribute(target("bar")) is unknown
> /tmp/mvc-ice.c: In function ‘foo.resolver’:
> cc1: fatal error: At least one more version other than the default is expected
>
> Should I add a test-case for a fatal error?

Better avoid fatal_error, can't you just return early after regular error()?

Do we error similarly for __attribute__((target_clones("default")))
from generic code?

I wonder if we can just go ahead even with num_versions == 1?


>
> Thanks,
> Martin

  reply	other threads:[~2017-03-14 11:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-13 15:23 [PATCH 0/3] Do not ICE on unsupported value of target attribute marxin
2017-03-13 15:23 ` [PATCH 2/3] Error message on target attribute on aarch64 target (PR target/79889) marxin
2017-03-21  9:21   ` Martin Liška
2017-03-21  9:24   ` Kyrill Tkachov
2017-04-03  7:26     ` Martin Liška
2017-04-07 11:14       ` James Greenhalgh
2017-03-13 15:23 ` [PATCH 3/3] Verify that target can create a dispatcher call (PR target/79892) marxin
2017-03-14 11:05   ` Richard Biener
2017-03-13 15:23 ` [PATCH 1/3] Error message on target attribute on power target (PR target/79906) marxin
2017-03-21  9:20   ` Martin Liška
2017-03-21 16:11   ` Segher Boessenkool
2017-03-14 10:24 ` [PATCH 4/N] Do not ICE on an invalid input for MV Martin Liška
2017-03-14 11:09   ` Richard Biener [this message]
2017-03-14 12:24     ` Martin Liška
2017-03-14 13:47       ` Richard Biener

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='CAFiYyc1bnOPJ2LJBAz3Mz5wLm_oP=0Pytad+oU0oyR8_sWw37A@mail.gmail.com' \
    --to=richard.guenther@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=mliska@suse.cz \
    /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).