aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/testsuite/gcc.target/s390/hotpatch-compile-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.8/gcc/testsuite/gcc.target/s390/hotpatch-compile-1.c')
-rw-r--r--gcc-4.8/gcc/testsuite/gcc.target/s390/hotpatch-compile-1.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc-4.8/gcc/testsuite/gcc.target/s390/hotpatch-compile-1.c b/gcc-4.8/gcc/testsuite/gcc.target/s390/hotpatch-compile-1.c
new file mode 100644
index 000000000..45a2cc5dc
--- /dev/null
+++ b/gcc-4.8/gcc/testsuite/gcc.target/s390/hotpatch-compile-1.c
@@ -0,0 +1,27 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do run } */
+/* { dg-options "-O3 -mzarch -mhotpatch" } */
+
+#include <stdio.h>
+
+void hp1(void)
+{
+ printf("hello, world!\n");
+}
+
+inline void hp2(void)
+{
+ printf("hello, world!\n");
+}
+
+__attribute__ ((always_inline))
+void hp3(void) /* { dg-warning "always_inline function might not be inlinable" } */
+{
+ printf("hello, world!\n");
+} /* { dg-warning "function 'hp3' with the 'always_inline' attribute is not hotpatchable" } */
+
+int main (void)
+{
+ return 0;
+}