Skip tests that make assumptions about struct layout that don't hold on epiphany.
authorJoern Rennecke <joern.rennecke@embecosm.com>
Fri, 26 Jul 2013 15:22:43 +0000 (15:22 +0000)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Fri, 26 Jul 2013 15:22:43 +0000 (16:22 +0100)
        Skip tests that make assumptions about struct layout that don't hold
        on epiphany.  These tests could be fixed by adding padded attributes,
        See:
        http://gcc.gnu.org/ml/gcc-patches/2011-08/msg00006.html
        http://gcc.gnu.org/ml/gcc-patches/2011-09/msg01513.html
        http://gcc.gnu.org/ml/gcc-patches/2011-09/msg01504.html

        * g++.dg/cpp0x/cast.C: Skip for epiphany-*-*.
        * g++.dg/cpp0x/iop.C: Likewise.
        * g++.dg/cpp0x/named_refs.C: Likewise.
        * g++.dg/cpp0x/rv1p.C: Likewise.
        * g++.dg/cpp0x/rv2p.C: Likewise.
        * g++.dg/cpp0x/rv3p.C: Likewise.
        * g++.dg/cpp0x/rv4p.C: Likewise.
        * g++.dg/cpp0x/rv5p.C: Likewise.
        * g++.dg/cpp0x/rv6p.C: Likewise.
        * g++.dg/cpp0x/rv7p.C: Likewise.
        * g++.dg/cpp0x/rv8p.C: Likewise.
        * g++.dg/ext/strncpy-chk1.C: Likewise.
        * gcc.dg/builtin-object-size-10.c: Likewise.
        * gcc.dg/builtin-object-size-11.c: Likewise.
        * gcc.dg/builtin-stringop-chk-1.c: Likewise.
        * gcc.dg/pr25805.c: Likewise.
        * gcc.c-torture/execute/builtins/memcpy-chk.x: New file.
        * gcc.c-torture/execute/builtins/memmove-chk.x: Likewise.
        * gcc.c-torture/execute/builtins/mempcpy-chk.x: Likewise.
        * gcc.c-torture/execute/builtins/memset-chk.x: Likewise.
        * gcc.c-torture/execute/builtins/snprintf-chk.x: Likewise.
        * gcc.c-torture/execute/builtins/sprintf-chk.x: Likewise.
        * gcc.c-torture/execute/builtins/stpcpy-chk.x: Likewise.
        * gcc.c-torture/execute/builtins/strcat-chk.x: Likewise.
        * gcc.c-torture/execute/builtins/strcpy-chk.x: Likewise.
        * gcc.c-torture/execute/builtins/strncat-chk.x: Likewise.
        * gcc.c-torture/execute/builtins/strncpy-chk.x: Likewise.
        * gcc.c-torture/execute/builtins/vsnprintf-chk.x: Likewise.
        * gcc.c-torture/execute/builtins/vsprintf-chk.x: Likewise.
        * gcc.c-torture/execute/zerolen-2.x: Likewise.

From-SVN: r201268

31 files changed:
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/cast.C
gcc/testsuite/g++.dg/cpp0x/iop.C
gcc/testsuite/g++.dg/cpp0x/named_refs.C
gcc/testsuite/g++.dg/cpp0x/rv1p.C
gcc/testsuite/g++.dg/cpp0x/rv2p.C
gcc/testsuite/g++.dg/cpp0x/rv3p.C
gcc/testsuite/g++.dg/cpp0x/rv4p.C
gcc/testsuite/g++.dg/cpp0x/rv5p.C
gcc/testsuite/g++.dg/cpp0x/rv6p.C
gcc/testsuite/g++.dg/cpp0x/rv7p.C
gcc/testsuite/g++.dg/cpp0x/rv8p.C
gcc/testsuite/g++.dg/ext/strncpy-chk1.C
gcc/testsuite/gcc.c-torture/execute/builtins/memcpy-chk.x [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/builtins/memmove-chk.x [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/builtins/mempcpy-chk.x [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/builtins/memset-chk.x [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/builtins/snprintf-chk.x [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/builtins/sprintf-chk.x [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/builtins/stpcpy-chk.x [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/builtins/strcat-chk.x [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/builtins/strcpy-chk.x [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/builtins/strncat-chk.x [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/builtins/strncpy-chk.x [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/builtins/vsnprintf-chk.x [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/builtins/vsprintf-chk.x [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/zerolen-2.x [new file with mode: 0644]
gcc/testsuite/gcc.dg/builtin-object-size-10.c
gcc/testsuite/gcc.dg/builtin-object-size-11.c
gcc/testsuite/gcc.dg/builtin-stringop-chk-1.c
gcc/testsuite/gcc.dg/pr25805.c

index ba033d65a0890e203c3111cab6717f0ed9bac026..fab69c88a6da7e58f55cece9ae7f1d8512366bd8 100644 (file)
@@ -1,3 +1,38 @@
+2013-07-26  Joern Rennecke <joern.rennecke@embecosm.com>
+
+       Skip tests that make assumptions about struct layout that don't hold
+       on epiphany:
+       * g++.dg/cpp0x/cast.C: Skip for epiphany-*-*.
+       * g++.dg/cpp0x/iop.C: Likewise.
+       * g++.dg/cpp0x/named_refs.C: Likewise.
+       * g++.dg/cpp0x/rv1p.C: Likewise.
+       * g++.dg/cpp0x/rv2p.C: Likewise.
+       * g++.dg/cpp0x/rv3p.C: Likewise.
+       * g++.dg/cpp0x/rv4p.C: Likewise.
+       * g++.dg/cpp0x/rv5p.C: Likewise.
+       * g++.dg/cpp0x/rv6p.C: Likewise.
+       * g++.dg/cpp0x/rv7p.C: Likewise.
+       * g++.dg/cpp0x/rv8p.C: Likewise.
+       * g++.dg/ext/strncpy-chk1.C: Likewise.
+       * gcc.dg/builtin-object-size-10.c: Likewise.
+       * gcc.dg/builtin-object-size-11.c: Likewise.
+       * gcc.dg/builtin-stringop-chk-1.c: Likewise.
+       * gcc.dg/pr25805.c: Likewise.
+       * gcc.c-torture/execute/builtins/memcpy-chk.x: New file.
+       * gcc.c-torture/execute/builtins/memmove-chk.x: Likewise.
+       * gcc.c-torture/execute/builtins/mempcpy-chk.x: Likewise.
+       * gcc.c-torture/execute/builtins/memset-chk.x: Likewise.
+       * gcc.c-torture/execute/builtins/snprintf-chk.x: Likewise.
+       * gcc.c-torture/execute/builtins/sprintf-chk.x: Likewise.
+       * gcc.c-torture/execute/builtins/stpcpy-chk.x: Likewise.
+       * gcc.c-torture/execute/builtins/strcat-chk.x: Likewise.
+       * gcc.c-torture/execute/builtins/strcpy-chk.x: Likewise.
+       * gcc.c-torture/execute/builtins/strncat-chk.x: Likewise.
+       * gcc.c-torture/execute/builtins/strncpy-chk.x: Likewise.
+       * gcc.c-torture/execute/builtins/vsnprintf-chk.x: Likewise.
+       * gcc.c-torture/execute/builtins/vsprintf-chk.x: Likewise.
+       * gcc.c-torture/execute/zerolen-2.x: Likewise.
+
 2013-07-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
        * gcc.target/arm/minmax_minus.c: Scan for absence of mov.
index 9162d09f3fd071c3ee46b1399411a8b9cc6f0fa3..9cf97e688b04cd60e58486097059ff2fe20c93b7 100644 (file)
@@ -4,6 +4,7 @@
 
 // { dg-do compile }
 // { dg-options "-std=c++0x" }
+// { dg-skip-if "packed attribute missing for struct one" { "epiphany-*-*" } { "*" } { "" } }
 
 template <bool> struct sa;
 template <> struct sa<true> {};
index 834cd314abe1cea3e483af8af0a11b5736b685d3..2eb3a3ce3375315b9d3535d6727fb91c9339dc06 100644 (file)
@@ -8,6 +8,7 @@
 
 // { dg-do compile }
 // { dg-options "-std=c++0x" }
+// { dg-skip-if "packed attribute missing for struct one" { "epiphany-*-*" } { "*" } { "" } }
 
 template <bool> struct sa;
 template <> struct sa<true> {};
index 697867e11d91309abf6a34548e5192b7fdfee7a8..0ccd42f4a0fe1396749ae0e3113e387fb8cf84c0 100644 (file)
@@ -4,6 +4,7 @@
 
 // { dg-do compile }
 // { dg-options "-std=c++0x" }
+// { dg-skip-if "packed attribute missing for struct one" { "epiphany-*-*" } { "*" } { "" } }
 
 template <bool> struct sa;
 template <> struct sa<true> {};
index abe5de0b35e435a61273e0b4d99f16390f320070..99e39e6a4bcfd294c4dbab41a8ddea0eb6441d1d 100644 (file)
@@ -4,6 +4,7 @@
 
 // { dg-do compile }
 // { dg-options "-std=c++0x" }
+// { dg-skip-if "packed attribute missing for struct one/three/five/seven" { "epiphany-*-*" } { "*" } { "" } }
 
 template <bool> struct sa;
 template <> struct sa<true> {};
index 722d1b8d8b12f88090a4da04e56e127d8be8f27a..fca45c7352a5f15ebb652a0c916281214c82cc8a 100644 (file)
@@ -4,6 +4,7 @@
 
 // { dg-do compile }
 // { dg-options "-std=c++0x" }
+// { dg-skip-if "packed attribute missing for struct one/three/five/seven" { "epiphany-*-*" } { "*" } { "" } }
 
 template <bool> struct sa;
 template <> struct sa<true> {};
index fad89e1d938448b29b8b8147254162bb795ee79e..804b2ffbdbe4537a143b54dd11e86d35c19f7450 100644 (file)
@@ -4,6 +4,7 @@
 
 // { dg-do compile }
 // { dg-options "-std=c++0x" }
+// { dg-skip-if "packed attribute missing for struct one/three/five/seven" { "epiphany-*-*" } { "*" } { "" } }
 
 template <bool> struct sa;
 template <> struct sa<true> {};
index 134ca13e0f9c73f8ae89069c79279213013a8501..b2744e3cd9e131d585a885de425821b1c674a767 100644 (file)
@@ -4,6 +4,7 @@
 
 // { dg-do compile }
 // { dg-options "-std=c++0x" }
+// { dg-skip-if "packed attribute missing for struct one/three/five/seven" { "epiphany-*-*" } { "*" } { "" } }
 
 template <bool> struct sa;
 template <> struct sa<true> {};
index b8ab545889a9bde0b766b06276ef593012b9c9c4..9bb5e2bbb8920290fb8f170eecb50553f8035905 100644 (file)
@@ -4,6 +4,7 @@
 
 // { dg-do compile }
 // { dg-options "-std=c++0x" }
+// { dg-skip-if "packed attribute missing for struct one/three/five/seven" { "epiphany-*-*" } { "*" } { "" } }
 
 template <bool> struct sa;
 template <> struct sa<true> {};
index 4b78ef70bd006d32dba8358ff74be765c49e6b96..b2a3bdedd1be69cfc4b1ef87374090c87e2428d7 100644 (file)
@@ -4,6 +4,7 @@
 
 // { dg-do compile }
 // { dg-options "-std=c++0x" }
+// { dg-skip-if "packed attribute missing for struct one/three/five/seven" { "epiphany-*-*" } { "*" } { "" } }
 
 template <bool> struct sa;
 template <> struct sa<true> {};
index 94aa07b93a84aebe790ee96e7a9fff6bc88ff450..918dc14b98c7c434b0c0b7d0869e43c07b7ebf4a 100644 (file)
@@ -4,6 +4,7 @@
 
 // { dg-do compile }
 // { dg-options "-std=c++0x" }
+// { dg-skip-if "packed attribute missing for struct one/three/five/seven" { "epiphany-*-*" } { "*" } { "" } }
 
 template <bool> struct sa;
 template <> struct sa<true> {};
index fb9ec4ce7926f47212c37a8d2be537bb6c3e7f81..f6784dffc221961b8d443cb076a20f8141d842bd 100644 (file)
@@ -4,6 +4,7 @@
 
 // { dg-do compile }
 // { dg-options "-std=c++0x" }
+// { dg-skip-if "packed attribute missing for struct one/three/five/seven" { "epiphany-*-*" } { "*" } { "" } }
 
 template <bool> struct sa;
 template <> struct sa<true> {};
index 7770ba931270013e87b001c55ca77b59651d55c6..ebafc99887bd9cb7a6be6d2e09a8dc0804c281ec 100644 (file)
@@ -1,6 +1,7 @@
 // PR c++/40502
 // { dg-do compile }
 // { dg-options "-O2" }
+// { dg-skip-if "packed attribute missing for struct A" { "epiphany-*-*" } { "*" } { "" } }
 
 struct A { char x[12], y[35]; };
 struct B { char z[50]; };
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/memcpy-chk.x b/gcc/testsuite/gcc.c-torture/execute/builtins/memcpy-chk.x
new file mode 100644 (file)
index 0000000..e976a75
--- /dev/null
@@ -0,0 +1,7 @@
+if [istarget "epiphany-*-*"] {
+    # This test assumes the absence of struct padding.
+    # to make this true for test4 struct A on epiphany would require
+    # __attribute__((packed)) .
+    return 1
+}
+return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/memmove-chk.x b/gcc/testsuite/gcc.c-torture/execute/builtins/memmove-chk.x
new file mode 100644 (file)
index 0000000..acf2132
--- /dev/null
@@ -0,0 +1,7 @@
+if [istarget "epiphany-*-*"] {
+    # This test assumes the absence of struct padding.
+    # to make this true for test5 struct A on epiphany would require
+    # __attribute__((packed)) .
+    return 1
+}
+return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/mempcpy-chk.x b/gcc/testsuite/gcc.c-torture/execute/builtins/mempcpy-chk.x
new file mode 100644 (file)
index 0000000..e976a75
--- /dev/null
@@ -0,0 +1,7 @@
+if [istarget "epiphany-*-*"] {
+    # This test assumes the absence of struct padding.
+    # to make this true for test4 struct A on epiphany would require
+    # __attribute__((packed)) .
+    return 1
+}
+return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/memset-chk.x b/gcc/testsuite/gcc.c-torture/execute/builtins/memset-chk.x
new file mode 100644 (file)
index 0000000..9b83634
--- /dev/null
@@ -0,0 +1,7 @@
+if [istarget "epiphany-*-*"] {
+    # This test assumes the absence of struct padding.
+    # to make this true for test3 struct A on epiphany would require
+    # __attribute__((packed)) .
+    return 1
+}
+return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/snprintf-chk.x b/gcc/testsuite/gcc.c-torture/execute/builtins/snprintf-chk.x
new file mode 100644 (file)
index 0000000..9b83634
--- /dev/null
@@ -0,0 +1,7 @@
+if [istarget "epiphany-*-*"] {
+    # This test assumes the absence of struct padding.
+    # to make this true for test3 struct A on epiphany would require
+    # __attribute__((packed)) .
+    return 1
+}
+return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/sprintf-chk.x b/gcc/testsuite/gcc.c-torture/execute/builtins/sprintf-chk.x
new file mode 100644 (file)
index 0000000..9b83634
--- /dev/null
@@ -0,0 +1,7 @@
+if [istarget "epiphany-*-*"] {
+    # This test assumes the absence of struct padding.
+    # to make this true for test3 struct A on epiphany would require
+    # __attribute__((packed)) .
+    return 1
+}
+return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/stpcpy-chk.x b/gcc/testsuite/gcc.c-torture/execute/builtins/stpcpy-chk.x
new file mode 100644 (file)
index 0000000..e976a75
--- /dev/null
@@ -0,0 +1,7 @@
+if [istarget "epiphany-*-*"] {
+    # This test assumes the absence of struct padding.
+    # to make this true for test4 struct A on epiphany would require
+    # __attribute__((packed)) .
+    return 1
+}
+return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/strcat-chk.x b/gcc/testsuite/gcc.c-torture/execute/builtins/strcat-chk.x
new file mode 100644 (file)
index 0000000..9b83634
--- /dev/null
@@ -0,0 +1,7 @@
+if [istarget "epiphany-*-*"] {
+    # This test assumes the absence of struct padding.
+    # to make this true for test3 struct A on epiphany would require
+    # __attribute__((packed)) .
+    return 1
+}
+return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/strcpy-chk.x b/gcc/testsuite/gcc.c-torture/execute/builtins/strcpy-chk.x
new file mode 100644 (file)
index 0000000..e976a75
--- /dev/null
@@ -0,0 +1,7 @@
+if [istarget "epiphany-*-*"] {
+    # This test assumes the absence of struct padding.
+    # to make this true for test4 struct A on epiphany would require
+    # __attribute__((packed)) .
+    return 1
+}
+return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/strncat-chk.x b/gcc/testsuite/gcc.c-torture/execute/builtins/strncat-chk.x
new file mode 100644 (file)
index 0000000..9b83634
--- /dev/null
@@ -0,0 +1,7 @@
+if [istarget "epiphany-*-*"] {
+    # This test assumes the absence of struct padding.
+    # to make this true for test3 struct A on epiphany would require
+    # __attribute__((packed)) .
+    return 1
+}
+return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/strncpy-chk.x b/gcc/testsuite/gcc.c-torture/execute/builtins/strncpy-chk.x
new file mode 100644 (file)
index 0000000..e976a75
--- /dev/null
@@ -0,0 +1,7 @@
+if [istarget "epiphany-*-*"] {
+    # This test assumes the absence of struct padding.
+    # to make this true for test4 struct A on epiphany would require
+    # __attribute__((packed)) .
+    return 1
+}
+return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/vsnprintf-chk.x b/gcc/testsuite/gcc.c-torture/execute/builtins/vsnprintf-chk.x
new file mode 100644 (file)
index 0000000..0d6e85c
--- /dev/null
@@ -0,0 +1,7 @@
+if [istarget "epiphany-*-*"] {
+    # This test assumes the absence of struct padding.
+    # to make this true for test3_sub struct A on epiphany would require
+    # __attribute__((packed)) .
+    return 1
+}
+return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/vsprintf-chk.x b/gcc/testsuite/gcc.c-torture/execute/builtins/vsprintf-chk.x
new file mode 100644 (file)
index 0000000..0d6e85c
--- /dev/null
@@ -0,0 +1,7 @@
+if [istarget "epiphany-*-*"] {
+    # This test assumes the absence of struct padding.
+    # to make this true for test3_sub struct A on epiphany would require
+    # __attribute__((packed)) .
+    return 1
+}
+return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/zerolen-2.x b/gcc/testsuite/gcc.c-torture/execute/zerolen-2.x
new file mode 100644 (file)
index 0000000..cee203d
--- /dev/null
@@ -0,0 +1,7 @@
+if [istarget "epiphany-*-*"] {
+    # This test assumes the absence of larger-than-word padding.
+    # to make this true for struct foo on epiphany would require
+    # __attribute__((packed,aligned(__alignof__(word)))) .
+    return 1
+}
+return 0
index 96c523e3609a350e14367b29d424483bf7ed9f0d..956d4a860e3995a5ba95ad85a4d5e50a22177b95 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fdump-tree-objsz1-details" } */
+// { dg-skip-if "packed attribute missing for drone_source_packet" { "epiphany-*-*" } { "*" } { "" } }
 
 typedef struct {
     char sentinel[4];
index a98bc356c47e465feb99fdbca19be91be720d87c..309a68416ae1392a1a0f1c4b0a21f020ec5c4977 100644 (file)
@@ -1,6 +1,7 @@
 /* PR48985 */
 /* { dg-do run } */
 /* { dg-options "-std=gnu89" } */
+/* { dg-skip-if "packed attribute missing for struct s" { "epiphany-*-*" } { "*" } { "" } } */
 
 extern void abort (void);
 
index 5cec6b361e4001300598741dc8e06895a4bfb39a..bb727da28e4d9132d8d22839326f3f6ea0eb6048 100644 (file)
@@ -3,6 +3,7 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -std=gnu99 -ftrack-macro-expansion=0" } */
 /* { dg-additional-options "-mstructure-size-boundary=8" { target arm*-*-* } } */
+// { dg-skip-if "packed attribute missing for t" { "epiphany-*-*" } { "*" } { "" } }
 
 extern void abort (void);
 
index 71182c52f2ebfa3fa7926ccc8689a87042de42e2..94133ddd952eeea7d9722aea6805244c9a4036a7 100644 (file)
@@ -2,6 +2,7 @@
    storage for d1.a.  */
 /* { dg-do run } */
 /* { dg-options "" } */
+/* { dg-skip-if "packed attribute missing for d1" { "epiphany-*-*" } { "*" } { "" } } */
 extern void abort (void);
 extern void exit (int);