This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 4/N] Do not ICE on an invalid input for MV.
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Martin Liška <mliska at suse dot cz>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 14 Mar 2017 12:09:15 +0100
- Subject: Re: [PATCH 4/N] Do not ICE on an invalid input for MV.
- Authentication-results: sourceware.org; auth=none
- References: <cover.1489418416.git.mliska@suse.cz> <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