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 ba033d6..fab69c8 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 9162d09..9cf97e6 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 834cd31..2eb3a3c 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 697867e..0ccd42f 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 abe5de0..99e39e6 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 722d1b8..fca45c7 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 fad89e1..804b2ff 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 134ca13..b2744e3 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 b8ab545..9bb5e2b 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 4b78ef7..b2a3bde 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 94aa07b..918dc14 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 fb9ec4c..f6784df 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 7770ba9..ebafc99 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 96c523e..956d4a8 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 a98bc35..309a684 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 5cec6b3..bb727da 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 71182c5..94133dd 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);