From patchwork Thu Jan 18 14:08:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 124968 Delivered-To: patch@linaro.org Received: by 10.46.64.27 with SMTP id n27csp141030lja; Thu, 18 Jan 2018 06:08:28 -0800 (PST) X-Google-Smtp-Source: ACJfBovp9LJQd8kl5Mtbd9YK6HrC2bq8BunH0TUS9a6bHvr+xuXWGRhmThG2fCFAi2s5ka6ZBn/Y X-Received: by 10.98.106.1 with SMTP id f1mr25967119pfc.162.1516284508618; Thu, 18 Jan 2018 06:08:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516284508; cv=none; d=google.com; s=arc-20160816; b=WXD/KAh4sXqn9AuxHJf5iNdu4t6saaIxs/g5nvVfZ+liSAMzlPDsixOnSV4X0Fbv7d WGohzA683Vp8vLlBgGVQ36r6vDYhu2EOV+moNGpM9TXOqK7V/lfvN/piMHgv/Zk/LdAq NUgw/rl+zIhkATsnAnxUg4W3NsA7GerChVdemwSqY1gR3lLqGVYpggaIl0MuLfFKO5kq J+j4mkh9s5VOduSB30c08hDZLXjLa7KDHtev2RUpGbE3UvVZoVgEcaoltmeLmu9JV55r HIACFFNJVQR2omaBn4dXmmWQldIDOQIV0MQmhLSjYCatqIns7u/8lZ//NtR0EoYnwkGf Dxeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:mime-version:delivered-to:sender :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mailing-list:dkim-signature:domainkey-signature :arc-authentication-results; bh=4jslFPTvAqOsJ5fCsvcEONsL0ePGNpXPKiq9bSYFpUw=; b=q3wbC1cKst1RcCspwUj6nR2Aep9tBYcza4pWdkMeRpAU4LfLRQ5MDVZ8derm+FIQ/I Z8SJgB2qri3GGTTECSRnOp8gJN82KUWDsCnXv1UFDWJKTp6hbu4rZ//9RzrDJmQQI6+t 2+vwvyiRM8GmUP+o/LRu6OmUiqSa4iz13RdIaGroau76akUG2B7V4jLjlRBrCARAPvcR jPF2deOb7SG+u9DGqPms2uHaj+nNZImhnVDGPo1dcMcQ5HkuZ2Ec5FGcA8Dqi0j/w9qW J/AqywACbP5bk/H5DDFUvrDTg5SYUrLH2/LVzpwgIxKLZBaSUUC7xd1MdKOtAhxBAZk8 efCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=FOQi2PvR; spf=pass (google.com: domain of gcc-patches-return-471582-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-471582-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id m89si6882938pfg.140.2018.01.18.06.08.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Jan 2018 06:08:28 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-471582-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=FOQi2PvR; spf=pass (google.com: domain of gcc-patches-return-471582-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-471582-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; q= dns; s=default; b=iIhiTCpj9wdroAaRoStSDpyy2qNu+R76R2NUQhTH/Iqjdk FP3dL4+nKlRlPuOv0+10blJaR+7IBla6LV9PPU6na6QZt1WVv/5aZLe12Cj6okfD qX6TzW33laN+jxJKmWXK7vSp7UKgJS/nq3twPUkex305jBtX8PjPrnhRw5aY8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; s= default; bh=QXMZYPcyCUB7qv2+3NOWXo07oU8=; b=FOQi2PvRHKO0h5cDc6yo dHMg6cGtzvK878C3Z5dNowU2UmE2gvJYFTKgrHU19PUOIJOujUesNHZDQrKtEmVE yPxTXKbIR9o81gUJAmq+bblAV5isnwS2OkM0+iLuEVzESNw88i0nHVv2NJZCG5ak HsRRqlI2O8/yow4KP7uYmKM= Received: (qmail 9666 invoked by alias); 18 Jan 2018 14:08:18 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 9651 invoked by uid 89); 18 Jan 2018 14:08:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-vk0-f43.google.com Received: from mail-vk0-f43.google.com (HELO mail-vk0-f43.google.com) (209.85.213.43) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 18 Jan 2018 14:08:15 +0000 Received: by mail-vk0-f43.google.com with SMTP id f186so7871255vkc.1 for ; Thu, 18 Jan 2018 06:08:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=U3yOZ2+5K2evHrqd0EWMwRulw9oexPpRX87U4bjOUTA=; b=sMEWH986h0+cPXyz6DtKsy2vHVEE1q/AHDKskth1d3/8i7bjEuI0CtHG6WR7b/tjyJ JbqB4KVg3rCsN/nTe/d+41lmj1+Jh+CTPPeTSJ0EjhJoDQj3SSi7rl8epg6IV113f6m6 Af+fCkiZ8ZPFlTx8OO0MX+Qmg3B1tc122ys4hemW1qUeq0A7rRP2LTPMuNr1aKWLV3qs zvuveLOy62FZDHCRSPpujDu3YjosrNxcwudsmgst28SFvvOp8HozS1PCgwkbqK5ihP+3 GoaIIxJf4goOZCZ5/cFlJ0vr1PNYTVt+xRP4W0Bh1IPJkGHuBg5CgcZWCa4TyOF7MeTr wvWg== X-Gm-Message-State: AKwxytfjPX3X4rVYt1h+el2V8CLIbjt1A2rQg8DQAFnFtT0hAXajQVXf wvwrrpLxwH58Z1mBHKRKACMj2GDIVNGE3QjJwIAF0HXKLi4= X-Received: by 10.31.142.82 with SMTP id q79mr4946750vkd.144.1516284493629; Thu, 18 Jan 2018 06:08:13 -0800 (PST) MIME-Version: 1.0 Received: by 10.103.150.150 with HTTP; Thu, 18 Jan 2018 06:08:12 -0800 (PST) From: Christophe Lyon Date: Thu, 18 Jan 2018 15:08:12 +0100 Message-ID: Subject: [ARM,testsuite] Make arm_arch_FUNC_ok more robust To: gcc Patches X-IsSubscribed: yes Hi, I'm resurrecting a patch I posted in 2012-09 :) effective_target_arm_arch_FUNC_ok currently contains only #if !defined (DEF) #error FOO #endif which is not sufficient for GCC to complain in case of an unsupported flags combination. For instance, -mfloat-abi=hard -mthumb -march=armv5te leads to: sorry, unimplemented: Thumb-1 hard-float VFP ABI but only if the compiler had actual code to compile. Adding a dummy main() body in the arm_arch_FUNC_ok effective target does the trick: with this patch, this effective target test would fail, making the test unsupported rather than failing later. OK? Christophe 2018-01-18 Christophe Lyon gcc/testsuite: * lib/target-supports.exp (check_effective_target_arm_arch_FUNC_ok): Add function body to force error messages in some configurations. diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index f597316..bc7d451 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -2211,6 +2211,11 @@ foreach { armfunc armflag armdef } { v4 "-march=armv4 -marm" __ARM_ARCH_4__ #if !defined (DEF) #error FOO #endif + int + main (void) + { + return 0; + } } "FLAG" ] }