From patchwork Tue Apr 17 15:36:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyrill Tkachov X-Patchwork-Id: 899421 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-476478-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=foss.arm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="mSrl/Kh6"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40QTrk5x9jz9ry1 for ; Wed, 18 Apr 2018 01:37:09 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; q=dns; s=default; b=u1KNtByNTp/mSVoJDvP2IaKTodxqPk/ZFsgs1REky5k HvWpjRfybDQfuASbL4n1ynjfwzu6j81HsYoB5FIUl0RlHJogtgf4KUMxvwS8PkCw LxAZLCipPfRRg28c7Zz2ULx/Fe9Q0eiBaX8b3RKswEl3trJEztDZa9yMufKZuW5k = 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 :message-id:date:from:mime-version:to:cc:subject:content-type; s=default; bh=Om9JoX+jVfN5CDRjbiuwy7/8dLY=; b=mSrl/Kh6IVgxKATjR DR+9OKiJ22IWkmkekCbGFPO1QXwDgp3Y/n1k/NY6U5zBhhw74Fb/ZyAzbcR2L45y DkVON2LzJ/52pK9nJFNB9+/SmC/+2lZ0K+E8CV+nbvmhJie/dSlBkIIObcOPwqLm jOerey4p8SBP8h5g11XD7ie2M8= Received: (qmail 128253 invoked by alias); 17 Apr 2018 15:37:02 -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 128241 invoked by uid 89); 17 Apr 2018 15:37:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, KAM_LOTSOFHASH autolearn=ham version=3.3.2 spammy= X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 17 Apr 2018 15:36:59 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3A4501435; Tue, 17 Apr 2018 08:36:57 -0700 (PDT) Received: from [10.2.207.77] (e100706-lin.cambridge.arm.com [10.2.207.77]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 91D253F25D; Tue, 17 Apr 2018 08:36:56 -0700 (PDT) Message-ID: <5AD61496.7070006@foss.arm.com> Date: Tue, 17 Apr 2018 16:36:54 +0100 From: Kyrill Tkachov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" CC: Jakub Jelinek Subject: [PATCH][AArch64/arm] PR testsuite/85326 Avoid C++ tests when C++ compiler not present Hi all, This patch makes the arm and aarch64 testsuite safe for when a C++ compiler is not present. This involves moving .C files into g++.dg/other/ and guarding them with the appropriate target check. For others it just means renaming them from .C to .c. For gcc.target/aarch64/simd/pr67896.C this means adjusting the error messages to look for the errors that the C frontend gives for conflicting types rather than what C++ gives. This fixes the errors seen when testing a non-bootstrapped C-only GCC and the tests still pass on normal testing setups and the tests that are in g++.dg appear UNSUPPORTED on the targets that they don't pertain to. Tested this on arm-none-linux-gnueabihf and aarch64-none-linux-gnu. Ok for trunk? Thanks, Kyrill 2018-04-17 Kyrylo Tkachov PR testsuite/85326 * gcc.target/arm/pr54300.C: Move to... * g++.dg/other/pr54300.C: ... Here. Add target directives. * gcc.target/arm/pr55073.C: Move to... * g++.dg/other/pr55073.C: ... Here. Add target directives. * gcc.target/arm/pr56184.C: Move to... * g++.dg/other/pr56184.C: ... Here. Add target directives. * gcc.target/arm/pr59985.C: Move to... * g++.dg/other/pr59985.C: ... Here. Add target directives. * gcc.target/aarch64/pr60675.C: Move to... * g++.dg/other/pr60675.C: ... Here. Add target directives. * gcc.target/aarch64/pr81422.C: Move to... * g++.dg/other/pr81422.C: ... Here. Add target directives. * gcc.target/aarch64/sve/const_pred_1.C: Move to... * g++.dg/other/sve_const_pred_1.C: ... Here. Add target directives. * gcc.target/aarch64/sve/const_pred_2.C: Move to... * g++.dg/other/sve_const_pred_2.C: ... Here. Add target directives. * gcc.target/aarch64/sve/const_pred_3.C: Move to... * g++.dg/other/sve_const_pred_3.C: ... Here. Add target directives. * gcc.target/aarch64/sve/const_pred_4.C: Move to... * g++.dg/other/sve_const_pred_4.C: ... Here. Add target directives. * gcc.target/aarch64/sve/tls_2.C: Move to... * g++.dg/other/sve_tls_2.C: ... Here. Add target directives. * gcc.target/aarch64/pr81414.C: Rename to... * gcc.target/aarch64/pr81414.c: ... This. * gcc.target/aarch64/simd/pr67896.C: Rename to... * gcc.target/aarch64/simd/pr67896.c: ... This. Update error expected messages. * gcc.target/aarch64/sve/vcond_1.C: Rename to... * gcc.target/aarch64/sve/vcond_1.c: ... This. Avoid use of stdint.h. * gcc.target/aarch64/sve/vcond_1_run.C: Rename to... * gcc.target/aarch64/sve/vcond_1_run.c: ... This. Update include file name. diff --git a/gcc/testsuite/gcc.target/aarch64/pr60675.C b/gcc/testsuite/g++.dg/other/pr60675.C similarity index 99% rename from gcc/testsuite/gcc.target/aarch64/pr60675.C rename to gcc/testsuite/g++.dg/other/pr60675.C index aa88cdb240358629d2be575297c2acc957364f23..11001559147db822041a8b806a8d30b6e99a785c 100644 --- a/gcc/testsuite/gcc.target/aarch64/pr60675.C +++ b/gcc/testsuite/g++.dg/other/pr60675.C @@ -1,4 +1,4 @@ -/* { dg-do compile } */ +/* { dg-do compile { target fpic } } */ /* { dg-options "-std=c++11 -w -O2 -fPIC" } */ namespace CLHEP { static const double meter = 1000.*10; diff --git a/gcc/testsuite/gcc.target/aarch64/pr81414.C b/gcc/testsuite/gcc.target/aarch64/pr81414.c similarity index 100% rename from gcc/testsuite/gcc.target/aarch64/pr81414.C rename to gcc/testsuite/gcc.target/aarch64/pr81414.c diff --git a/gcc/testsuite/gcc.target/aarch64/pr81422.C b/gcc/testsuite/g++.dg/other/pr81422.C similarity index 100% rename from gcc/testsuite/gcc.target/aarch64/pr81422.C rename to gcc/testsuite/g++.dg/other/pr81422.C diff --git a/gcc/testsuite/gcc.target/aarch64/simd/pr67896.C b/gcc/testsuite/gcc.target/aarch64/simd/pr67896.C deleted file mode 100644 index 1f916e09f4fc6b10f40fb3c84134f3c3f135c68d..0000000000000000000000000000000000000000 --- a/gcc/testsuite/gcc.target/aarch64/simd/pr67896.C +++ /dev/null @@ -1,7 +0,0 @@ -typedef __Poly8_t A; -typedef __Poly16_t A; /* { dg-error "conflicting declaration" } */ -typedef __Poly64_t A; /* { dg-error "conflicting declaration" } */ -typedef __Poly128_t A; /* { dg-error "conflicting declaration" } */ - -typedef __Poly8x8_t B; -typedef __Poly16x8_t B; /* { dg-error "conflicting declaration" } */ diff --git a/gcc/testsuite/gcc.target/aarch64/simd/pr67896.c b/gcc/testsuite/gcc.target/aarch64/simd/pr67896.c new file mode 100644 index 0000000000000000000000000000000000000000..3e27bea0e952368c46afbad760c22811f369db06 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/simd/pr67896.c @@ -0,0 +1,7 @@ +typedef __Poly8_t A; +typedef __Poly16_t A; /* { dg-error "conflicting types" } */ +typedef __Poly64_t A; /* { dg-error "conflicting types" } */ +typedef __Poly128_t A; /* { dg-error "conflicting types" } */ + +typedef __Poly8x8_t B; +typedef __Poly16x8_t B; /* { dg-error "conflicting types" } */ diff --git a/gcc/testsuite/gcc.target/aarch64/sve/const_pred_1.C b/gcc/testsuite/g++.dg/other/sve_const_pred_1.C similarity index 78% rename from gcc/testsuite/gcc.target/aarch64/sve/const_pred_1.C rename to gcc/testsuite/g++.dg/other/sve_const_pred_1.C index 25b7663273fef57f2c6bec58d534d3a1873f3100..cc124c06ee571d8189ade53c193db5334645173b 100644 --- a/gcc/testsuite/gcc.target/aarch64/sve/const_pred_1.C +++ b/gcc/testsuite/g++.dg/other/sve_const_pred_1.C @@ -1,5 +1,5 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -msve-vector-bits=256" } */ +/* { dg-do compile { target aarch64*-*-* } } */ +/* { dg-options "-O2 -march=armv8.2-a+sve -msve-vector-bits=256" } */ #include diff --git a/gcc/testsuite/gcc.target/aarch64/sve/const_pred_2.C b/gcc/testsuite/g++.dg/other/sve_const_pred_2.C similarity index 75% rename from gcc/testsuite/gcc.target/aarch64/sve/const_pred_2.C rename to gcc/testsuite/g++.dg/other/sve_const_pred_2.C index 4c781ca560c4788fa754c87d1e111d70a2ed91ab..e3bce397cbf2061f3cf471739a9686fc6914a33b 100644 --- a/gcc/testsuite/gcc.target/aarch64/sve/const_pred_2.C +++ b/gcc/testsuite/g++.dg/other/sve_const_pred_2.C @@ -1,5 +1,5 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -msve-vector-bits=256" } */ +/* { dg-do compile { target aarch64*-*-* } } */ +/* { dg-options "-O2 -march=armv8.2-a+sve -msve-vector-bits=256" } */ #include diff --git a/gcc/testsuite/gcc.target/aarch64/sve/const_pred_3.C b/gcc/testsuite/g++.dg/other/sve_const_pred_3.C similarity index 73% rename from gcc/testsuite/gcc.target/aarch64/sve/const_pred_3.C rename to gcc/testsuite/g++.dg/other/sve_const_pred_3.C index 6196ee05be7b14ed59bec8327278a596b6e1df37..9e75f399e4b38b93394baec677bd720fb6b6b40d 100644 --- a/gcc/testsuite/gcc.target/aarch64/sve/const_pred_3.C +++ b/gcc/testsuite/g++.dg/other/sve_const_pred_3.C @@ -1,5 +1,5 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -msve-vector-bits=256" } */ +/* { dg-do compile { target aarch64*-*-* } } */ +/* { dg-options "-O2 -march=armv8.2-a+sve -msve-vector-bits=256" } */ #include diff --git a/gcc/testsuite/gcc.target/aarch64/sve/const_pred_4.C b/gcc/testsuite/g++.dg/other/sve_const_pred_4.C similarity index 72% rename from gcc/testsuite/gcc.target/aarch64/sve/const_pred_4.C rename to gcc/testsuite/g++.dg/other/sve_const_pred_4.C index 2bdf67fd03861b26c83371a77ddc10992ffa09b5..04a13513380507841aa4de3e7303c7d42a7b18ca 100644 --- a/gcc/testsuite/gcc.target/aarch64/sve/const_pred_4.C +++ b/gcc/testsuite/g++.dg/other/sve_const_pred_4.C @@ -1,5 +1,5 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -msve-vector-bits=256" } */ +/* { dg-do compile { target aarch64*-*-* } } */ +/* { dg-options "-O2 -march=armv8.2-a+sve -msve-vector-bits=256" } */ #include diff --git a/gcc/testsuite/gcc.target/aarch64/sve/tls_2.C b/gcc/testsuite/g++.dg/other/sve_tls_2.C similarity index 84% rename from gcc/testsuite/gcc.target/aarch64/sve/tls_2.C rename to gcc/testsuite/g++.dg/other/sve_tls_2.C index c18a737ae041ecf15309633cac903664b9272e7f..d159255fc9498bdb4a4ee1fbac982658a049923a 100644 --- a/gcc/testsuite/gcc.target/aarch64/sve/tls_2.C +++ b/gcc/testsuite/g++.dg/other/sve_tls_2.C @@ -1,5 +1,5 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -fPIC -msve-vector-bits=256" } */ +/* { dg-do compile { target aarch64*-*-* } } */ +/* { dg-options "-O2 -march=armv8.2-a+sve -fPIC -msve-vector-bits=256" } */ #include diff --git a/gcc/testsuite/gcc.target/aarch64/sve/vcond_1.C b/gcc/testsuite/gcc.target/aarch64/sve/vcond_1.c similarity index 96% rename from gcc/testsuite/gcc.target/aarch64/sve/vcond_1.C rename to gcc/testsuite/gcc.target/aarch64/sve/vcond_1.c index 6fd6b420eeff9c8f60f1b0f30704d51f565b99b9..66208425e2ee4240e7d184033a6239bb456da3fe 100644 --- a/gcc/testsuite/gcc.target/aarch64/sve/vcond_1.C +++ b/gcc/testsuite/gcc.target/aarch64/sve/vcond_1.c @@ -1,17 +1,15 @@ /* { dg-do assemble { target aarch64_asm_sve_ok } } */ /* { dg-options "-O -msve-vector-bits=256 --save-temps" } */ -#include - -typedef int8_t vnx16qi __attribute__((vector_size(32))); -typedef int16_t vnx8hi __attribute__((vector_size(32))); -typedef int32_t vnx4si __attribute__((vector_size(32))); -typedef int64_t vnx2di __attribute__((vector_size(32))); - -typedef uint8_t v32qu __attribute__((vector_size(32))); -typedef uint16_t v16hu __attribute__((vector_size(32))); -typedef uint32_t v8su __attribute__((vector_size(32))); -typedef uint64_t v4du __attribute__((vector_size(32))); +typedef __INT8_TYPE__ vnx16qi __attribute__((vector_size(32))); +typedef __INT16_TYPE__ vnx8hi __attribute__((vector_size(32))); +typedef __INT32_TYPE__ vnx4si __attribute__((vector_size(32))); +typedef __INT64_TYPE__ vnx2di __attribute__((vector_size(32))); + +typedef __UINT8_TYPE__ v32qu __attribute__((vector_size(32))); +typedef __UINT16_TYPE__ v16hu __attribute__((vector_size(32))); +typedef __UINT32_TYPE__ v8su __attribute__((vector_size(32))); +typedef __UINT64_TYPE__ v4du __attribute__((vector_size(32))); #define DEF_VCOND_VAR(TYPE, COND, SUFFIX) \ TYPE vcond_##TYPE##_##SUFFIX (TYPE x, TYPE y, TYPE a, TYPE b) \ diff --git a/gcc/testsuite/gcc.target/aarch64/sve/vcond_1_run.C b/gcc/testsuite/gcc.target/aarch64/sve/vcond_1_run.c similarity index 98% rename from gcc/testsuite/gcc.target/aarch64/sve/vcond_1_run.C rename to gcc/testsuite/gcc.target/aarch64/sve/vcond_1_run.c index 2df33710d8fa89e7f0810dd8bf23551921c9d9b7..72dab3942a965edbf7f304f0a12ed62e5e02d826 100644 --- a/gcc/testsuite/gcc.target/aarch64/sve/vcond_1_run.C +++ b/gcc/testsuite/gcc.target/aarch64/sve/vcond_1_run.c @@ -2,7 +2,7 @@ /* { dg-options "-O" } */ /* { dg-options "-O -msve-vector-bits=256" { target aarch64_sve256_hw } } */ -#include "vcond_1.C" +#include "vcond_1.c" #define NUM_ELEMS(X) (sizeof (X) / sizeof (X[0])) diff --git a/gcc/testsuite/gcc.target/arm/pr54300.C b/gcc/testsuite/g++.dg/other/pr54300.C similarity index 97% rename from gcc/testsuite/gcc.target/arm/pr54300.C rename to gcc/testsuite/g++.dg/other/pr54300.C index 9105e279b331180aed8c5cadef2194cfe5b446ea..e16646a3041c855cfa33664be7b493a7461b9821 100644 --- a/gcc/testsuite/gcc.target/arm/pr54300.C +++ b/gcc/testsuite/g++.dg/other/pr54300.C @@ -1,4 +1,4 @@ -/* { dg-do run } */ +/* { dg-do run { target arm*-*-* } } */ /* { dg-require-effective-target arm_neon } */ /* { dg-options "-O2" } */ /* { dg-add-options arm_neon } */ diff --git a/gcc/testsuite/gcc.target/arm/pr55073.C b/gcc/testsuite/g++.dg/other/pr55073.C similarity index 98% rename from gcc/testsuite/gcc.target/arm/pr55073.C rename to gcc/testsuite/g++.dg/other/pr55073.C index 5575cf77911a6bd7663eb6a8a6b4c9ece17e17df..859c5d46a09091b2da5ec4446b0527619bb335a1 100644 --- a/gcc/testsuite/gcc.target/arm/pr55073.C +++ b/gcc/testsuite/g++.dg/other/pr55073.C @@ -1,4 +1,4 @@ -/* { dg-do run } */ +/* { dg-do run { target arm*-*-* } } */ /* { dg-require-effective-target arm_neon } */ /* { dg-options "-O2" } */ /* { dg-add-options arm_neon } */ diff --git a/gcc/testsuite/gcc.target/arm/pr56184.C b/gcc/testsuite/g++.dg/other/pr56184.C similarity index 99% rename from gcc/testsuite/gcc.target/arm/pr56184.C rename to gcc/testsuite/g++.dg/other/pr56184.C index 82442225603d8cca981a5c9599439e46ac724b75..dc949283c988bd33e9ebd27ff667df14c6d10b07 100644 --- a/gcc/testsuite/gcc.target/arm/pr56184.C +++ b/gcc/testsuite/g++.dg/other/pr56184.C @@ -1,4 +1,4 @@ -/* { dg-do compile } */ +/* { dg-do compile { target arm*-*-* } } */ /* { dg-skip-if "incompatible options" { ! { arm_thumb1_ok || arm_thumb2_ok } } } */ /* { dg-options "-fno-short-enums -O2 -mthumb -march=armv7-a -mfpu=neon -mfloat-abi=softfp -mtune=cortex-a9 -fno-section-anchors -Wno-return-type" } */ diff --git a/gcc/testsuite/gcc.target/arm/pr59985.C b/gcc/testsuite/g++.dg/other/pr59985.C similarity index 97% rename from gcc/testsuite/gcc.target/arm/pr59985.C rename to gcc/testsuite/g++.dg/other/pr59985.C index ecf72b190b4e649ed9959c39a975356ad8e41f04..7c9bfab35f162dc189922aeeff34183474a57976 100644 --- a/gcc/testsuite/gcc.target/arm/pr59985.C +++ b/gcc/testsuite/g++.dg/other/pr59985.C @@ -1,4 +1,4 @@ -/* { dg-do compile } */ +/* { dg-do compile { target arm*-*-* } } */ /* { dg-skip-if "incompatible options" { arm_thumb1 } } */ /* { dg-options "-g -fcompare-debug -O2 -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16 -mfloat-abi=hard" } */ /* { dg-skip-if "need hardfp abi" { *-*-* } { "-mfloat-abi=soft" } { "" } } */