aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Sebor <msebor@redhat.com>2016-02-19 18:37:40 +0000
committerMartin Sebor <msebor@gcc.gnu.org>2016-02-19 11:37:40 -0700
commit15fca21a3e563ae90a5cc4ae00c36cc0c8e3f6f9 (patch)
tree0ab8bdaa71674931e703bffb87dab468f18982ae
parent200e869c8f2ce63376d5985f3f1030c1d1ca869f (diff)
downloadgcc-15fca21a3e563ae90a5cc4ae00c36cc0c8e3f6f9.zip
gcc-15fca21a3e563ae90a5cc4ae00c36cc0c8e3f6f9.tar.gz
gcc-15fca21a3e563ae90a5cc4ae00c36cc0c8e3f6f9.tar.bz2
PR testsuite/69573 - FAIL: gcc.dg/pr61053.c (test for excess errors)
Tested on x86_64 by running make check-c with RUNTESTFLAGS='--target_board=unix/-m32/-m128bit-long-double dg.exp=pr61053.c' gcc/testsuite/ChangeLog: 2016-01-30 Martin Sebor <msebor@redhat.com> PR testsuite/69573 * gcc.dg/pr61053.c: Tweaked test to avoid bogus failures. From-SVN: r233564
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/pr61053.c20
2 files changed, 20 insertions, 5 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index c60de26..adc1072 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2016-02-19 Martin Sebor <msebor@redhat.com>
+
+ PR testsuite/69573
+ * gcc.dg/pr61053.c: Tweaked test to avoid bogus failures.
+
2016-02-19 Jakub Jelinek <jakub@redhat.com>
PR c++/69850
diff --git a/gcc/testsuite/gcc.dg/pr61053.c b/gcc/testsuite/gcc.dg/pr61053.c
index e270420..1c090e0 100644
--- a/gcc/testsuite/gcc.dg/pr61053.c
+++ b/gcc/testsuite/gcc.dg/pr61053.c
@@ -67,9 +67,19 @@ _Alignas (long double) double dld;
_Alignas (char) long double ldc; /* { dg-error "cannot reduce alignment" } */
_Alignas (short int) long double lds; /* { dg-error "cannot reduce alignment" } */
-_Alignas (int) long double ldi; /* { dg-error "cannot reduce alignment" "" { target { ! { ia32 } } } } */
-_Alignas (long int) long double ldl; /* { dg-error "cannot reduce alignment" "" { target { ! { ia32 } } } } */
-_Alignas (long long int) long double ldll; /* { dg-error "cannot reduce alignment" "" { target { ! { ia32 } } } } */
-_Alignas (float) long double ldf; /* { dg-error "cannot reduce alignment" "" { target { ! { ia32 } } } } */
-_Alignas (double) long double ldd; /* { dg-error "cannot reduce alignment" "" { target { ! { ia32 } } } } */
+
+#if __SIZEOF_LONG_DOUBLE__ == 12
+/* Get around PR testsuite/69573 - FAIL: gcc.dg/pr61053.c (test for excess
+ errors) on targets such as x86_64-apple-darwin15.3.0 where long double
+ is 16 bytes wide even in LP32. */
+# define X(T) short
+#else
+# define X(T) T
+#endif
+
+_Alignas (X (int)) long double ldi; /* { dg-error "cannot reduce alignment" } */
+_Alignas (X (long int)) long double ldl; /* { dg-error "cannot reduce alignment" } */
+_Alignas (X (long long int)) long double ldll; /* { dg-error "cannot reduce alignment" } */
+_Alignas (X (float)) long double ldf; /* { dg-error "cannot reduce alignment" } */
+_Alignas (X (double)) long double ldd; /* { dg-error "cannot reduce alignment" } */
_Alignas (long double) long double ldld;