Re: [PATCH][AArch64/arm] PR testsuite/85326 Avoid C++ tests when C++ compiler not present
On 17/04/18 21:47, Jakub Jelinek wrote: On Tue, Apr 17, 2018 at 04:36:54PM +0100, Kyrill Tkachov wrote: 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. Sorry for missing it in review. I've noticed that +FAIL: g++.dg/other/pr81422.C -std=gnu++98 (test for excess errors) on both x86_64-linux and i686-linux, so added the needed c++11 effective target to the test and then noticed a couple of further things. Tested on x86_64-linux with -m32/-m64, committed to trunk as obvious: Thanks Jakub, sorry for missing these. Kyrill 2018-04-17 Jakub JelinekPR testsuite/85326 * g++.dg/other/pr81422.C: Require effective target tls and c++11. * g++.dg/other/pr60675.C: Likewise. Remove -std=c++11 from dg-options. * g++.dg/other/sve_tls_2.C: Require effective target tls. --- gcc/testsuite/g++.dg/other/pr81422.C.jj 2018-04-17 19:00:20.635357348 +0200 +++ gcc/testsuite/g++.dg/other/pr81422.C2018-04-17 22:38:54.391423522 +0200 @@ -1,4 +1,5 @@ -/* { dg-do compile } */ +/* { dg-do compile { target c++11 } } */ +/* { dg-require-effective-target tls } */ /* { dg-options "-O0" } */ struct DArray @@ -12,4 +13,3 @@ void foo35(DArray) static __thread int x[5]; foo35({5, (int*)}); } - --- gcc/testsuite/g++.dg/other/pr60675.C.jj 2018-04-17 19:00:20.610357336 +0200 +++ gcc/testsuite/g++.dg/other/pr60675.C2018-04-17 22:38:23.853407970 +0200 @@ -1,5 +1,7 @@ -/* { dg-do compile { target fpic } } */ -/* { dg-options "-std=c++11 -w -O2 -fPIC" } */ +/* { dg-do compile { target c++11 } } */ +/* { dg-require-effective-target tls } */ +/* { dg-require-effective-target fpic } */ +/* { dg-options "-w -O2 -fPIC" } */ namespace CLHEP { static const double meter = 1000.*10; static const double meter2 = meter*meter; --- gcc/testsuite/g++.dg/other/sve_tls_2.C.jj 2018-04-17 19:00:20.610357336 +0200 +++ gcc/testsuite/g++.dg/other/sve_tls_2.C 2018-04-17 22:39:30.931442140 +0200 @@ -1,4 +1,5 @@ /* { dg-do compile { target aarch64*-*-* } } */ +/* { dg-require-effective-target tls } */ /* { dg-options "-O2 -march=armv8.2-a+sve -fPIC -msve-vector-bits=256" } */ #include Jakub
Re: [PATCH][AArch64/arm] PR testsuite/85326 Avoid C++ tests when C++ compiler not present
On Tue, Apr 17, 2018 at 04:36:54PM +0100, Kyrill Tkachov wrote: > 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. Sorry for missing it in review. I've noticed that +FAIL: g++.dg/other/pr81422.C -std=gnu++98 (test for excess errors) on both x86_64-linux and i686-linux, so added the needed c++11 effective target to the test and then noticed a couple of further things. Tested on x86_64-linux with -m32/-m64, committed to trunk as obvious: 2018-04-17 Jakub JelinekPR testsuite/85326 * g++.dg/other/pr81422.C: Require effective target tls and c++11. * g++.dg/other/pr60675.C: Likewise. Remove -std=c++11 from dg-options. * g++.dg/other/sve_tls_2.C: Require effective target tls. --- gcc/testsuite/g++.dg/other/pr81422.C.jj 2018-04-17 19:00:20.635357348 +0200 +++ gcc/testsuite/g++.dg/other/pr81422.C2018-04-17 22:38:54.391423522 +0200 @@ -1,4 +1,5 @@ -/* { dg-do compile } */ +/* { dg-do compile { target c++11 } } */ +/* { dg-require-effective-target tls } */ /* { dg-options "-O0" } */ struct DArray @@ -12,4 +13,3 @@ void foo35(DArray) static __thread int x[5]; foo35({5, (int*)}); } - --- gcc/testsuite/g++.dg/other/pr60675.C.jj 2018-04-17 19:00:20.610357336 +0200 +++ gcc/testsuite/g++.dg/other/pr60675.C2018-04-17 22:38:23.853407970 +0200 @@ -1,5 +1,7 @@ -/* { dg-do compile { target fpic } } */ -/* { dg-options "-std=c++11 -w -O2 -fPIC" } */ +/* { dg-do compile { target c++11 } } */ +/* { dg-require-effective-target tls } */ +/* { dg-require-effective-target fpic } */ +/* { dg-options "-w -O2 -fPIC" } */ namespace CLHEP { static const double meter = 1000.*10; static const double meter2 = meter*meter; --- gcc/testsuite/g++.dg/other/sve_tls_2.C.jj 2018-04-17 19:00:20.610357336 +0200 +++ gcc/testsuite/g++.dg/other/sve_tls_2.C 2018-04-17 22:39:30.931442140 +0200 @@ -1,4 +1,5 @@ /* { dg-do compile { target aarch64*-*-* } } */ +/* { dg-require-effective-target tls } */ /* { dg-options "-O2 -march=armv8.2-a+sve -fPIC -msve-vector-bits=256" } */ #include Jakub
Re: [PATCH][AArch64/arm] PR testsuite/85326 Avoid C++ tests when C++ compiler not present
On Tue, Apr 17, 2018 at 04:36:54PM +0100, Kyrill Tkachov wrote: > 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? Ok, thanks. Jakub
[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 TkachovPR 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.. --- 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 ..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