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 Jelinek <ja...@redhat.com>
PR 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.C 2018-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*)&x});
}
-
--- gcc/testsuite/g++.dg/other/pr60675.C.jj 2018-04-17 19:00:20.610357336
+0200
+++ gcc/testsuite/g++.dg/other/pr60675.C 2018-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 <stdint.h>
Jakub