]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Add testcases missing from hotpatch v2
authorAndreas Krebbel <Andreas.Krebbel@de.ibm.com>
Tue, 24 Feb 2015 08:26:32 +0000 (08:26 +0000)
committerAndreas Krebbel <krebbel@gcc.gnu.org>
Tue, 24 Feb 2015 08:26:32 +0000 (08:26 +0000)
2015-02-24  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

Add testcases missing from hotpatch v2
* gcc/testsuite/gcc.target/s390/hotpatch-13.c
* gcc/testsuite/gcc.target/s390/hotpatch-15.c
* gcc/testsuite/gcc.target/s390/hotpatch-17.c
* gcc/testsuite/gcc.target/s390/hotpatch-19.c
* gcc/testsuite/gcc.target/s390/hotpatch-compile-11.c
* gcc/testsuite/gcc.target/s390/hotpatch-compile-13.c
* gcc/testsuite/gcc.target/s390/hotpatch-compile-15.c
* gcc/testsuite/gcc.target/s390/hotpatch-20.c
* gcc/testsuite/gcc.target/s390/hotpatch-compile-9.c
* gcc/testsuite/gcc.target/s390/hotpatch-14.c
* gcc/testsuite/gcc.target/s390/hotpatch-16.c
* gcc/testsuite/gcc.target/s390/hotpatch-18.c
* gcc/testsuite/gcc.target/s390/hotpatch-compile-10.c
* gcc/testsuite/gcc.target/s390/hotpatch-compile-12.c
* gcc/testsuite/gcc.target/s390/hotpatch-compile-14.c
* gcc/testsuite/gcc.target/s390/hotpatch-compile-16.c

Backport from mainline
2015-02-23  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

* gcc.target/s390/hotpatch-8.c: Add -march=g5.
* gcc.target/s390/hotpatch-9.c: Add -march=g5.
* gcc.target/s390/hotpatch-compile-1.c: Fix error message.
* gcc.target/s390/hotpatch-compile-10.c: Likewise.
* gcc.target/s390/hotpatch-compile-11.c: Likewise.
* gcc.target/s390/hotpatch-compile-12.c: Likewise.
* gcc.target/s390/hotpatch-compile-13.c: Likewise.
* gcc.target/s390/hotpatch-compile-14.c: Likewise.
* gcc.target/s390/hotpatch-compile-2.c: Likewise.
* gcc.target/s390/hotpatch-compile-3.c: Likewise.
* gcc.target/s390/hotpatch-compile-4.c: Likewise.
* gcc.target/s390/hotpatch-compile-5.c: Likewise.
* gcc.target/s390/hotpatch-compile-6.c: Likewise.
* gcc.target/s390/hotpatch-compile-7.c: Likewise.
* gcc.target/s390/hotpatch-compile-8.c: Likewise.
* gcc.target/s390/hotpatch-compile-9.c: Likewise.

From-SVN: r220932

27 files changed:
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/s390/hotpatch-13.c [new file with mode: 0644]
gcc/testsuite/gcc.target/s390/hotpatch-14.c [new file with mode: 0644]
gcc/testsuite/gcc.target/s390/hotpatch-15.c [new file with mode: 0644]
gcc/testsuite/gcc.target/s390/hotpatch-16.c [new file with mode: 0644]
gcc/testsuite/gcc.target/s390/hotpatch-17.c [new file with mode: 0644]
gcc/testsuite/gcc.target/s390/hotpatch-18.c [new file with mode: 0644]
gcc/testsuite/gcc.target/s390/hotpatch-19.c [new file with mode: 0644]
gcc/testsuite/gcc.target/s390/hotpatch-20.c [new file with mode: 0644]
gcc/testsuite/gcc.target/s390/hotpatch-8.c
gcc/testsuite/gcc.target/s390/hotpatch-9.c
gcc/testsuite/gcc.target/s390/hotpatch-compile-1.c
gcc/testsuite/gcc.target/s390/hotpatch-compile-10.c [new file with mode: 0644]
gcc/testsuite/gcc.target/s390/hotpatch-compile-11.c [new file with mode: 0644]
gcc/testsuite/gcc.target/s390/hotpatch-compile-12.c [new file with mode: 0644]
gcc/testsuite/gcc.target/s390/hotpatch-compile-13.c [new file with mode: 0644]
gcc/testsuite/gcc.target/s390/hotpatch-compile-14.c [new file with mode: 0644]
gcc/testsuite/gcc.target/s390/hotpatch-compile-15.c [new file with mode: 0644]
gcc/testsuite/gcc.target/s390/hotpatch-compile-16.c [new file with mode: 0644]
gcc/testsuite/gcc.target/s390/hotpatch-compile-2.c
gcc/testsuite/gcc.target/s390/hotpatch-compile-3.c
gcc/testsuite/gcc.target/s390/hotpatch-compile-4.c
gcc/testsuite/gcc.target/s390/hotpatch-compile-5.c
gcc/testsuite/gcc.target/s390/hotpatch-compile-6.c
gcc/testsuite/gcc.target/s390/hotpatch-compile-7.c
gcc/testsuite/gcc.target/s390/hotpatch-compile-8.c
gcc/testsuite/gcc.target/s390/hotpatch-compile-9.c [new file with mode: 0644]

index 1e89a1f38ad97bbd2a65a90bc3fab5abacc10758..7356b23fecaeac472913f0796a5e210d9975a491 100644 (file)
@@ -1,3 +1,43 @@
+2015-02-24  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+       Add testcases missing from hotpatch v2
+       * gcc/testsuite/gcc.target/s390/hotpatch-13.c
+       * gcc/testsuite/gcc.target/s390/hotpatch-15.c
+       * gcc/testsuite/gcc.target/s390/hotpatch-17.c
+       * gcc/testsuite/gcc.target/s390/hotpatch-19.c
+       * gcc/testsuite/gcc.target/s390/hotpatch-compile-11.c
+       * gcc/testsuite/gcc.target/s390/hotpatch-compile-13.c
+       * gcc/testsuite/gcc.target/s390/hotpatch-compile-15.c
+       * gcc/testsuite/gcc.target/s390/hotpatch-20.c
+       * gcc/testsuite/gcc.target/s390/hotpatch-compile-9.c
+       * gcc/testsuite/gcc.target/s390/hotpatch-14.c
+       * gcc/testsuite/gcc.target/s390/hotpatch-16.c
+       * gcc/testsuite/gcc.target/s390/hotpatch-18.c
+       * gcc/testsuite/gcc.target/s390/hotpatch-compile-10.c
+       * gcc/testsuite/gcc.target/s390/hotpatch-compile-12.c
+       * gcc/testsuite/gcc.target/s390/hotpatch-compile-14.c
+       * gcc/testsuite/gcc.target/s390/hotpatch-compile-16.c
+
+       Backport from mainline
+       2015-02-23  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+       * gcc.target/s390/hotpatch-8.c: Add -march=g5.
+       * gcc.target/s390/hotpatch-9.c: Add -march=g5.
+       * gcc.target/s390/hotpatch-compile-1.c: Fix error message.
+       * gcc.target/s390/hotpatch-compile-10.c: Likewise.
+       * gcc.target/s390/hotpatch-compile-11.c: Likewise.
+       * gcc.target/s390/hotpatch-compile-12.c: Likewise.
+       * gcc.target/s390/hotpatch-compile-13.c: Likewise.
+       * gcc.target/s390/hotpatch-compile-14.c: Likewise.
+       * gcc.target/s390/hotpatch-compile-2.c: Likewise.
+       * gcc.target/s390/hotpatch-compile-3.c: Likewise.
+       * gcc.target/s390/hotpatch-compile-4.c: Likewise.
+       * gcc.target/s390/hotpatch-compile-5.c: Likewise.
+       * gcc.target/s390/hotpatch-compile-6.c: Likewise.
+       * gcc.target/s390/hotpatch-compile-7.c: Likewise.
+       * gcc.target/s390/hotpatch-compile-8.c: Likewise.
+       * gcc.target/s390/hotpatch-compile-9.c: Likewise.
+
 2015-02-23  Oleg Endo  <olegendo@gcc.gnu.org>
 
        Backport from mainline
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-13.c b/gcc/testsuite/gcc.target/s390/hotpatch-13.c
new file mode 100644 (file)
index 0000000..8d4adca
--- /dev/null
@@ -0,0 +1,17 @@
+/* Functional tests for the function hotpatching feature.  */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch --save-temps" } */
+
+#include <stdio.h>
+
+__attribute__ ((hotpatch(1,0)))
+void hp1(void)
+{
+  printf("hello, world!\n");
+}
+
+/* Check number of occurences of certain instructions.  */
+/* { dg-final { scan-assembler-times "nopr\t%r7" 1 } } */
+/* { dg-final { scan-assembler-not "nop\t0" } } */
+/* { dg-final { scan-assembler-not "brcl\t\t0,0" } } */
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-14.c b/gcc/testsuite/gcc.target/s390/hotpatch-14.c
new file mode 100644 (file)
index 0000000..f1b2325
--- /dev/null
@@ -0,0 +1,17 @@
+/* Functional tests for the function hotpatching feature.  */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch --save-temps" } */
+
+#include <stdio.h>
+
+__attribute__ ((hotpatch(0,2)))
+void hp1(void)
+{
+  printf("hello, world!\n");
+}
+
+/* Check number of occurences of certain instructions.  */
+/* { dg-final { scan-assembler-not "nopr\t%r7" } } */
+/* { dg-final { scan-assembler-times "nop\t0" 1 } } */
+/* { dg-final { scan-assembler-not "brcl\t\t0,0" } } */
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-15.c b/gcc/testsuite/gcc.target/s390/hotpatch-15.c
new file mode 100644 (file)
index 0000000..dd158d3
--- /dev/null
@@ -0,0 +1,17 @@
+/* Functional tests for the function hotpatching feature.  */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch --save-temps" } */
+
+#include <stdio.h>
+
+__attribute__ ((hotpatch(1,2)))
+void hp1(void)
+{
+  printf("hello, world!\n");
+}
+
+/* Check number of occurences of certain instructions.  */
+/* { dg-final { scan-assembler-times "nopr\t%r7" 1 } } */
+/* { dg-final { scan-assembler-times "nop\t0" 1 } } */
+/* { dg-final { scan-assembler-not "brcl\t\t0,0" } } */
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-16.c b/gcc/testsuite/gcc.target/s390/hotpatch-16.c
new file mode 100644 (file)
index 0000000..592de2c
--- /dev/null
@@ -0,0 +1,17 @@
+/* Functional tests for the function hotpatching feature.  */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch -mhotpatch=0,0 --save-temps" } */
+
+#include <stdio.h>
+
+__attribute__ ((hotpatch(1,2)))
+void hp1(void)
+{
+  printf("hello, world!\n");
+}
+
+/* Check number of occurences of certain instructions.  */
+/* { dg-final { scan-assembler-times "nopr\t%r7" 1 } } */
+/* { dg-final { scan-assembler-times "nop\t0" 1 } } */
+/* { dg-final { scan-assembler-not "brcl\t\t0,0" } } */
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-17.c b/gcc/testsuite/gcc.target/s390/hotpatch-17.c
new file mode 100644 (file)
index 0000000..a1c94db
--- /dev/null
@@ -0,0 +1,17 @@
+/* Functional tests for the function hotpatching feature.  */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch -mhotpatch=1,2 --save-temps" } */
+
+#include <stdio.h>
+
+__attribute__ ((hotpatch(0,0)))
+void hp1(void)
+{
+  printf("hello, world!\n");
+}
+
+/* Check number of occurences of certain instructions.  */
+/* { dg-final { scan-assembler-not "nopr\t%r7" } } */
+/* { dg-final { scan-assembler-not "nop\t0" } } */
+/* { dg-final { scan-assembler-not "brcl\t\t0,0" } } */
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-18.c b/gcc/testsuite/gcc.target/s390/hotpatch-18.c
new file mode 100644 (file)
index 0000000..19c5ce3
--- /dev/null
@@ -0,0 +1,16 @@
+/* Functional tests for the function hotpatching feature.  */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch -mhotpatch=1,2 -mhotpatch=0,0 --save-temps" } */
+
+#include <stdio.h>
+
+void hp1(void)
+{
+  printf("hello, world!\n");
+}
+
+/* Check number of occurences of certain instructions.  */
+/* { dg-final { scan-assembler-not "nopr\t%r7" } } */
+/* { dg-final { scan-assembler-not "nop\t0" } } */
+/* { dg-final { scan-assembler-not "brcl\t\t0,0" } } */
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-19.c b/gcc/testsuite/gcc.target/s390/hotpatch-19.c
new file mode 100644 (file)
index 0000000..993d04d
--- /dev/null
@@ -0,0 +1,23 @@
+/* Functional tests for the function hotpatching feature.  */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch -mhotpatch=1,2 --save-temps" } */
+
+#include <stdio.h>
+
+/* { dg-prune-output "always_inline function might not be inlinable" } */
+__attribute__ ((always_inline))
+static void hp2(void)
+{
+  printf("hello, world!\n");
+}
+
+void hp1(void)
+{
+  hp2();
+}
+
+/* Check number of occurences of certain instructions.  */
+/* { dg-final { scan-assembler-times "nopr\t%r7" 1 } } */
+/* { dg-final { scan-assembler-times "nop\t0" 1 } } */
+/* { dg-final { scan-assembler-not "brcl\t\t0,0" } } */
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-20.c b/gcc/testsuite/gcc.target/s390/hotpatch-20.c
new file mode 100644 (file)
index 0000000..8872139
--- /dev/null
@@ -0,0 +1,20 @@
+/* Functional tests for the function hotpatching feature.  */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch --save-temps" } */
+
+#include <stdio.h>
+
+/* { dg-prune-output "always_inline function might not be inlinable" } */
+__attribute__ ((hotpatch(1,2)))
+__attribute__ ((always_inline))
+static void hp2(void)
+{
+  printf("hello, world!\n");
+}
+
+/* { dg-prune-output "called from here" } */
+void hp1(void)
+{
+  hp2();
+}
index 8edcfccb62f780f9e16b85ba1dc2cae08fcd05c2..7681eda2bbbeffa4ed391900ebe284bf01b353d1 100644 (file)
@@ -1,7 +1,7 @@
 /* Functional tests for the function hotpatching feature.  */
 
 /* { dg-do compile } */
-/* { dg-options "-O3 -mesa -m31 -mhotpatch=0,3 --save-temps" } */
+/* { dg-options "-O3 -mesa -m31 -march=g5 -mhotpatch=0,3 --save-temps" } */
 
 #include <stdio.h>
 
index 25b377180d63f09a69ad057d458f4337e0f67f4f..cf38d3dc66d5148e1213752119213ffb56f349ac 100644 (file)
@@ -1,7 +1,7 @@
 /* Functional tests for the function hotpatching feature.  */
 
 /* { dg-do compile } */
-/* { dg-options "-O3 -mesa -m31 -mhotpatch=0,4 --save-temps" } */
+/* { dg-options "-O3 -mesa -m31 -march=g5 -mhotpatch=0,4 --save-temps" } */
 
 #include <stdio.h>
 
index d88e07eb2d6a6fc17ba045a3961db32e4e4a3db6..ca47f6be5def9572a51e0e6da7778f1b4f6c47a9 100644 (file)
@@ -2,10 +2,4 @@
 
 /* { dg-do compile } */
 /* { dg-options "-O3 -mzarch -mhotpatch=-1,0" } */
-
-int main (void)
-{
-  return 0;
-}
-
-/* { dg-excess-errors "argument to '-mhotpatch=' should be a non-negative integer" } */
+/* { dg-error "arguments to .-mhotpatch=n,m. should be non-negative integers" "" { target *-*-* } 1 } */
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-compile-10.c b/gcc/testsuite/gcc.target/s390/hotpatch-compile-10.c
new file mode 100644 (file)
index 0000000..8b6441d
--- /dev/null
@@ -0,0 +1,10 @@
+/* Functional tests for the function hotpatching feature.  */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch" } */
+
+__attribute__((hotpatch(0,0,0)))
+int main (void)
+{/* { dg-error "wrong number of arguments specified" } */
+  return 0;
+}
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-compile-11.c b/gcc/testsuite/gcc.target/s390/hotpatch-compile-11.c
new file mode 100644 (file)
index 0000000..36c0e22
--- /dev/null
@@ -0,0 +1,12 @@
+/* Functional tests for the function hotpatching feature.  */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch" } */
+
+int a;
+
+__attribute__((hotpatch(a,0)))
+int main (void)
+{ /* { dg-error "attribute is not a comma separated pair of non-negative integer constants or too large" } */
+  return 0;
+}
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-compile-12.c b/gcc/testsuite/gcc.target/s390/hotpatch-compile-12.c
new file mode 100644 (file)
index 0000000..9b5fbd3
--- /dev/null
@@ -0,0 +1,12 @@
+/* Functional tests for the function hotpatching feature.  */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch" } */
+
+int a;
+
+__attribute__((hotpatch(0,a)))
+int main (void)
+{ /* { dg-error "attribute is not a comma separated pair of non-negative integer constants or too large" } */
+  return 0;
+}
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-compile-13.c b/gcc/testsuite/gcc.target/s390/hotpatch-compile-13.c
new file mode 100644 (file)
index 0000000..a875241
--- /dev/null
@@ -0,0 +1,29 @@
+/* Functional tests for the function hotpatching feature.  */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch -mhotpatch=1000000,1000000" } */
+
+#include <stdio.h>
+
+void hp1(void)
+{
+  printf("hello, world!\n");
+}
+
+__attribute__ ((hotpatch(1000000,1000000)))
+void hp2(void)
+{
+  printf("hello, world!\n");
+}
+
+__attribute__ ((hotpatch(1000001,1000000)))
+void hp3(void)
+{ /* { dg-error " requested .hotpatch. attribute is not a comma separated pair" } */
+  printf("hello, world!\n");
+}
+
+__attribute__ ((hotpatch(1000000,1000001)))
+void hp4(void)
+{ /* { dg-error " requested .hotpatch. attribute is not a comma separated pair" } */
+  printf("hello, world!\n");
+}
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-compile-14.c b/gcc/testsuite/gcc.target/s390/hotpatch-compile-14.c
new file mode 100644 (file)
index 0000000..0b5e674
--- /dev/null
@@ -0,0 +1,11 @@
+/* Functional tests for the function hotpatching feature.  */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch -mhotpatch=1000001,1000000" } */
+
+viod main(void)
+{
+  return 0;
+}
+
+/* { dg-error "argument to .-mhotpatch=n,m. is too large" "" { target *-*-* } 1 } */
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-compile-15.c b/gcc/testsuite/gcc.target/s390/hotpatch-compile-15.c
new file mode 100644 (file)
index 0000000..4ce7375
--- /dev/null
@@ -0,0 +1,43 @@
+/* Functional tests for the function hotpatching feature.  */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch" } */
+
+/* { dg-prune-output "always_inline function might not be inlinable" } */
+/* { dg-prune-output "called from here" } */
+
+#include <stdio.h>
+
+__attribute__ ((hotpatch(1,2)))
+static void hp1(void)
+{
+  printf("hello, world!\n");
+}
+
+__attribute__ ((hotpatch(1,2)))
+static inline void hp2(void)
+{
+  printf("hello, world!\n");
+}
+
+__attribute__ ((hotpatch(0,0)))
+__attribute__ ((always_inline))
+static void hp3(void)
+{
+  printf("hello, world!\n");
+}
+
+__attribute__ ((hotpatch(1,2)))
+__attribute__ ((always_inline))
+static void hp4(void)
+{
+  printf("hello, world!\n");
+}
+
+void main(void)
+{
+  hp1();
+  hp2();
+  hp3();
+  hp4();
+}
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-compile-16.c b/gcc/testsuite/gcc.target/s390/hotpatch-compile-16.c
new file mode 100644 (file)
index 0000000..d5ba7f0
--- /dev/null
@@ -0,0 +1,26 @@
+/* A warning will be issued when requesting hotpatching on a nested function.  */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch" } */
+
+#include <stdio.h>
+
+typedef int (*fn_t)(void);
+
+fn_t hp1(void)
+{
+  __attribute__((hotpatch(0,0)))
+  int nested1(void)
+  { return 1; }
+
+  return nested1;
+}
+
+fn_t hp2(void)
+{
+  __attribute__ ((hotpatch(1,2)))
+  int nested2(void) /* { dg-warning "hotpatching is not compatible with nested functions" } */
+  { return 2; }
+
+  return nested2;
+}
index 95820e493fcfc447a68ddfa5c1ebbfae14754531..78253f59583ce9b0c48fc3c0ac6ef60290bd6830 100644 (file)
@@ -2,10 +2,4 @@
 
 /* { dg-do compile } */
 /* { dg-options "-O3 -mzarch -mhotpatch=0,-1" } */
-
-int main (void)
-{
-  return 0;
-}
-
-/* { dg-excess-errors "argument to '-mhotpatch=' should be a non-negative integer" } */
+/* { dg-error "arguments to .-mhotpatch=n,m. should be non-negative integers" "" { target *-*-* } 1 } */
index bbed9759fbd908878a55ed9898895d5b2f7d3dcd..6dde22422b0e5f8604a168822c03be3ec7e8766c 100644 (file)
@@ -2,10 +2,4 @@
 
 /* { dg-do compile } */
 /* { dg-options "-O3 -mzarch -mhotpatch=0" } */
-
-int main (void)
-{
-  return 0;
-}
-
-/* { dg-excess-errors "argument to '-mhotpatch=' should be a non-negative integer" } */
+/* { dg-error "arguments to .-mhotpatch=n,m. should be non-negative integers" "" { target *-*-* } 1 } */
index 4d926594a5cca04dc431626ed7d0a4ea140539ec..fbb30833775abd1f9cdf01e5e700b041a0145757 100644 (file)
@@ -2,10 +2,4 @@
 
 /* { dg-do compile } */
 /* { dg-options "-O3 -mzarch -mhotpatch=0,0,0" } */
-
-int main (void)
-{
-  return 0;
-}
-
-/* { dg-excess-errors "argument to '-mhotpatch=' should be a non-negative integer" } */
+/* { dg-error "arguments to .-mhotpatch=n,m. should be non-negative integers" "" { target *-*-* } 1 } */
index 46c9004d3e8a27851f2da5c40026961ec8203997..dc0ff6775b8d2b4ce6366dd9ea781867987e9ea2 100644 (file)
@@ -2,10 +2,4 @@
 
 /* { dg-do compile } */
 /* { dg-options "-O3 -mzarch -mhotpatch=a,0" } */
-
-int main (void)
-{
-  return 0;
-}
-
-/* { dg-excess-errors "argument to '-mhotpatch=' should be a non-negative integer" } */
+/* { dg-error "arguments to .-mhotpatch=n,m. should be non-negative integers" "" { target *-*-* } 1 } */
index b28e205512221a19238e39d9b4dfa15f2b8a74be..d04045eecd566f8f9a47676887870927c59f94c8 100644 (file)
@@ -2,10 +2,4 @@
 
 /* { dg-do compile } */
 /* { dg-options "-O3 -mzarch -mhotpatch=0,a" } */
-
-int main (void)
-{
-  return 0;
-}
-
-/* { dg-excess-errors "argument to '-mhotpatch=' should be a non-negative integer" } */
+/* { dg-error "arguments to .-mhotpatch=n,m. should be non-negative integers" "" { target *-*-* } 1 } */
index 2080eb1f94ac9852cc043b0265fa0aced4d973d2..3505703fe8c35e3f44111e6aa4816d37d87cbfe7 100644 (file)
@@ -5,8 +5,6 @@
 
 __attribute__((hotpatch(-1,0)))
 int main (void)
-{
+{/* { dg-error "attribute is not a comma separated pair of non-negative integer constants or too large" } */
   return 0;
 }
-
-/* { dg-excess-errors "argument to '-mhotpatch=' should be a non-negative integer" } */
index 46a38c860c262ebe0386b94a9ab4e83446be1036..fd354313627e8b48652425c9b42e1dc802d6fd7c 100644 (file)
@@ -5,8 +5,6 @@
 
 __attribute__((hotpatch(0,-1)))
 int main (void)
-{
+{/* { dg-error "attribute is not a comma separated pair of non-negative integer constants or too large" } */
   return 0;
 }
-
-/* { dg-excess-errors "argument to '-mhotpatch=' should be a non-negative integer" } */
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-compile-9.c b/gcc/testsuite/gcc.target/s390/hotpatch-compile-9.c
new file mode 100644 (file)
index 0000000..dcefbe4
--- /dev/null
@@ -0,0 +1,10 @@
+/* Functional tests for the function hotpatching feature.  */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch" } */
+
+__attribute__((hotpatch(0)))
+int main (void)
+{/* { dg-error "wrong number of arguments specified" } */
+  return 0;
+}