From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 79754 invoked by alias); 14 Mar 2017 11:09:18 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 79740 invoked by uid 89); 14 Mar 2017 11:09:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy= X-HELO: mail-ot0-f178.google.com Received: from mail-ot0-f178.google.com (HELO mail-ot0-f178.google.com) (74.125.82.178) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 14 Mar 2017 11:09:16 +0000 Received: by mail-ot0-f178.google.com with SMTP id 19so131829027oti.0 for ; Tue, 14 Mar 2017 04:09:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=8di7Q1ur6UeReqoyYghd/DzFYRZo07NiYCTLVTXy844=; b=Nt/JZujmshcmt9ns4dGgIdQ3ahQyv/9egBEt+df5o9L4VhAVOUNszflsGp+CFGvyIY 8pS6d+uQbWQ0u/EBIoSjOHtuHn85uyMaToEtnoV91dtpo35t5E2Le6PKFU3dzw+kKier dT2STnEfphWWclfm3WXykRsYrJkx9pfE1tjLIj1L1U3y8pUgtpZ/uz9UO1yILH+JHFtQ L0wNsWyqKskJj1EB8iFYSp96Kw2yw2OqyCEDibSOb9gc9xAngy7zs9fEAyZ2UpzzWEqL La+0rKVlnBDCH6Lz6sAvOKvAwaHhWxvEwDPONLxHPPCm6+kVxMBIh9vi6XybiTIyuRB1 SADA== X-Gm-Message-State: AMke39kkE6dR6GfwI79D0kcibXShSW9bgalKQM/r7wi9fMKvn2mbIPNQ2cjW8kwBRvzBi4Ak5ZLp9mOfKCZICA== X-Received: by 10.202.76.215 with SMTP id z206mr20109758oia.68.1489489755618; Tue, 14 Mar 2017 04:09:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.21.25 with HTTP; Tue, 14 Mar 2017 04:09:15 -0700 (PDT) In-Reply-To: <5fce5d4b-fd4f-ebf2-a7a9-4c911d606bcc@suse.cz> References: <5fce5d4b-fd4f-ebf2-a7a9-4c911d606bcc@suse.cz> From: Richard Biener Date: Tue, 14 Mar 2017 11:09:00 -0000 Message-ID: Subject: Re: [PATCH 4/N] Do not ICE on an invalid input for MV. To: =?UTF-8?Q?Martin_Li=C5=A1ka?= Cc: GCC Patches Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017-03/txt/msg00720.txt.bz2 On Tue, Mar 14, 2017 at 11:24 AM, Martin Li=C5=A1ka 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 =E2=80=98foo.resolver=E2=80=99: > cc1: fatal error: At least one more version other than the default is exp= ected > > 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 =3D=3D 1? > > Thanks, > Martin