aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAndy Hutchinson <hutchinsonandy@gcc.gnu.org>2009-11-21 01:34:51 +0000
committerAndy Hutchinson <hutchinsonandy@gcc.gnu.org>2009-11-21 01:34:51 +0000
commit842dffa5ca38064aaccd9e8590ed6e5a2da78766 (patch)
tree4bf63c1c200a8ecb759fa0800b040f056845057f /gcc
parentb04602917caf19609b2604ab006fec68c755f8dd (diff)
downloadgcc-842dffa5ca38064aaccd9e8590ed6e5a2da78766.zip
gcc-842dffa5ca38064aaccd9e8590ed6e5a2da78766.tar.gz
gcc-842dffa5ca38064aaccd9e8590ed6e5a2da78766.tar.bz2
re PR c/42114 (c99-stdint test fails for ptrdiff test)
PR Testsuite/42114 * gcc-dg/c99-stdint-1.c: Condition test for target without signal.h. XFAIL ptrdiff range test for avr. * gcc-dg/c99-stdint-2.c: XFAIL for avr target. * gcc-dg/c99-stdint-5.c: Condition test for target without signal.h. * gcc-dg/c99-stdint-6.c: Ditto. From-SVN: r154392
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog9
-rw-r--r--gcc/testsuite/gcc.dg/c99-stdint-1.c5
-rw-r--r--gcc/testsuite/gcc.dg/c99-stdint-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/c99-stdint-5.c4
-rw-r--r--gcc/testsuite/gcc.dg/c99-stdint-6.c4
5 files changed, 23 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 1af8b0f..f88e1a4 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,12 @@
+2009-11-19 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
+
+ PR Testsuite/42114
+ * gcc-dg/c99-stdint-1.c: Condition test for target without signal.h.
+ XFAIL ptrdiff range test for avr.
+ * gcc-dg/c99-stdint-2.c: XFAIL for avr target.
+ * gcc-dg/c99-stdint-5.c: Condition test for target without signal.h.
+ * gcc-dg/c99-stdint-6.c: Ditto.
+
2009-11-20 Michael Meissner <meissner@linux.vnet.ibm.com>
* gcc/testsuite/gcc.target/powerpc/vsx-vrsave.c: Delete,
diff --git a/gcc/testsuite/gcc.dg/c99-stdint-1.c b/gcc/testsuite/gcc.dg/c99-stdint-1.c
index 109aed4..37e1203 100644
--- a/gcc/testsuite/gcc.dg/c99-stdint-1.c
+++ b/gcc/testsuite/gcc.dg/c99-stdint-1.c
@@ -14,7 +14,9 @@
#include <stdint.h>
/* This and the later SIG_ATOMIC_* tests should be appropriately
conditioned for any freestanding targets with no <signal.h>. */
+#ifndef SIGNAL_SUPPRESS
#include <signal.h>
+#endif
/* Note that some of these conditions assume two's complement and no
padding bits; GCC only supports two's complement, and no supported
@@ -212,8 +214,11 @@ test_max (void)
void
test_misc_limits (void)
{
+/* { dg-bogus "size" "ptrdiff is 16bits" { xfail avr-*-* } 218 } */
CHECK_SIGNED_LIMITS_2(__PTRDIFF_TYPE__, PTRDIFF_MIN, PTRDIFF_MAX, -65535L, 65535L);
+#ifndef SIGNAL_SUPPRESS
CHECK_LIMITS_2(sig_atomic_t, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX, -127, 127, 255);
+#endif
CHECK_UNSIGNED_LIMITS_2(__SIZE_TYPE__, SIZE_MAX, 65535U);
CHECK_LIMITS_2(__WCHAR_TYPE__, WCHAR_MIN, WCHAR_MAX, -127, 127, 255);
CHECK_LIMITS_2(__WINT_TYPE__, WINT_MIN, WINT_MAX, -32767, 32767, 65535);
diff --git a/gcc/testsuite/gcc.dg/c99-stdint-2.c b/gcc/testsuite/gcc.dg/c99-stdint-2.c
index 0187b03..d1be0fb 100644
--- a/gcc/testsuite/gcc.dg/c99-stdint-2.c
+++ b/gcc/testsuite/gcc.dg/c99-stdint-2.c
@@ -2,7 +2,7 @@
Freestanding version. */
/* { dg-do compile } */
/* { dg-options "-std=iso9899:1999 -pedantic-errors -ffreestanding" } */
-
+/* { dg-xfail-if "ptrdiff size is 16bits" { avr-*-* } } */
/* The test is that there are no diagnostics, so just include the
hosted version. */
#include "c99-stdint-1.c"
diff --git a/gcc/testsuite/gcc.dg/c99-stdint-5.c b/gcc/testsuite/gcc.dg/c99-stdint-5.c
index da2f356..9c224ed 100644
--- a/gcc/testsuite/gcc.dg/c99-stdint-5.c
+++ b/gcc/testsuite/gcc.dg/c99-stdint-5.c
@@ -5,7 +5,9 @@
/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
#include <stdint.h>
+#ifndef SIGNAL_SUPPRESS
#include <signal.h>
+#endif
#define CHECK_TYPES(TYPE1, TYPE2) \
do { TYPE1 a; TYPE2 *b = &a; TYPE2 c; TYPE1 *d = &c; } while (0)
@@ -61,5 +63,7 @@ check_types (void)
#endif
CHECK_TYPES(__INTMAX_TYPE__, intmax_t);
CHECK_TYPES(__UINTMAX_TYPE__, uintmax_t);
+#ifndef SIGNAL_SUPPRESS
CHECK_TYPES(__SIG_ATOMIC_TYPE__, sig_atomic_t);
+#endif
}
diff --git a/gcc/testsuite/gcc.dg/c99-stdint-6.c b/gcc/testsuite/gcc.dg/c99-stdint-6.c
index cac0cdf..3d554e9 100644
--- a/gcc/testsuite/gcc.dg/c99-stdint-6.c
+++ b/gcc/testsuite/gcc.dg/c99-stdint-6.c
@@ -6,7 +6,9 @@
/* { dg-options "-std=gnu99 -pedantic-errors -DNO_LEAST_TYPES -DNO_FAST_TYPES -DNO_MAX_TYPES" { target alpha*-dec-osf5* } } */
#include <inttypes.h>
+#ifndef SIGNAL_SUPPRESS
#include <signal.h>
+#endif
#define CHECK_TYPES(TYPE1, TYPE2) \
do { TYPE1 a; TYPE2 *b = &a; TYPE2 c; TYPE1 *d = &c; } while (0)
@@ -68,5 +70,7 @@ check_types (void)
CHECK_TYPES(__INTMAX_TYPE__, intmax_t);
CHECK_TYPES(__UINTMAX_TYPE__, uintmax_t);
#endif
+#ifndef SIGNAL_SUPPRESS
CHECK_TYPES(__SIG_ATOMIC_TYPE__, sig_atomic_t);
+#endif
}