aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture
diff options
context:
space:
mode:
authorRong Xu <xur@google.com>2014-09-02 22:29:57 (GMT)
committerRong Xu <xur@google.com>2014-09-02 22:29:57 (GMT)
commite97c99f15937e5762a973b25192aab824126a6d3 (patch)
tree7f0be3ff7c7d976af06887dc50accd68f7630a7f /gcc-4.9/gcc/testsuite/gcc.c-torture
parentf1c18afafc2b321465ae6b07ede127095942d7dc (diff)
downloadtoolchain_gcc-e97c99f15937e5762a973b25192aab824126a6d3.zip
toolchain_gcc-e97c99f15937e5762a973b25192aab824126a6d3.tar.gz
toolchain_gcc-e97c99f15937e5762a973b25192aab824126a6d3.tar.bz2
[gcc-4.9] Merge svn r214745 from google/gcc-4_9 branch.
Merge gcc-4_9 source r214745 from google/gcc-4_9 branch. Change-Id: Ie6fa0fd72f4b4eec3adc4db4bb922e652d1c2605
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr60655-1.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20050316-3.x2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/execute/bitfld-6.c23
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/execute/pr23135.x2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/execute/pr61375.c35
5 files changed, 63 insertions, 1 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr60655-1.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr60655-1.c
index 6f84f6e..1e1e460 100644
--- a/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr60655-1.c
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr60655-1.c
@@ -1,4 +1,4 @@
-/* { dg-options "-fdata-sections" } */
+/* { dg-options "-fdata-sections" { target { ! { { hppa*-*-hpux* } && { ! lp64 } } } } } */
typedef unsigned char unit;
typedef unit *unitptr;
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20050316-3.x b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20050316-3.x
new file mode 100644
index 0000000..cb7b119
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20050316-3.x
@@ -0,0 +1,2 @@
+set additional_flags "-Wno-psabi"
+return 0
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/bitfld-6.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/bitfld-6.c
new file mode 100644
index 0000000..50927dc
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/bitfld-6.c
@@ -0,0 +1,23 @@
+union U
+{
+ const int a;
+ unsigned b : 20;
+};
+
+static union U u = { 0x12345678 };
+
+/* Constant folding used to fail to account for endianness when folding a
+ union. */
+
+int
+main (void)
+{
+#ifdef __BYTE_ORDER__
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ return u.b - 0x45678;
+#else
+ return u.b - 0x12345;
+#endif
+#endif
+ return 0;
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/pr23135.x b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/pr23135.x
new file mode 100644
index 0000000..cb7b119
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/pr23135.x
@@ -0,0 +1,2 @@
+set additional_flags "-Wno-psabi"
+return 0
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/pr61375.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/pr61375.c
new file mode 100644
index 0000000..6fb4693
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/pr61375.c
@@ -0,0 +1,35 @@
+#ifdef __UINT64_TYPE__
+typedef __UINT64_TYPE__ uint64_t;
+#else
+typedef unsigned long long uint64_t;
+#endif
+
+#ifndef __SIZEOF_INT128__
+#define __int128 long long
+#endif
+
+/* Some version of bswap optimization would ICE when analyzing a mask constant
+ too big for an HOST_WIDE_INT (PR61375). */
+
+__attribute__ ((noinline, noclone)) uint64_t
+uint128_central_bitsi_ior (unsigned __int128 in1, uint64_t in2)
+{
+ __int128 mask = (__int128)0xffff << 56;
+ return ((in1 & mask) >> 56) | in2;
+}
+
+int
+main (int argc)
+{
+ __int128 in = 1;
+#ifdef __SIZEOF_INT128__
+ in <<= 64;
+#endif
+ if (sizeof (uint64_t) * __CHAR_BIT__ != 64)
+ return 0;
+ if (sizeof (unsigned __int128) * __CHAR_BIT__ != 128)
+ return 0;
+ if (uint128_central_bitsi_ior (in, 2) != 0x102)
+ __builtin_abort ();
+ return 0;
+}