diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.target/s390/hotpatch-compile-8.c')
-rw-r--r-- | gcc-4.9/gcc/testsuite/gcc.target/s390/hotpatch-compile-8.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/s390/hotpatch-compile-8.c b/gcc-4.9/gcc/testsuite/gcc.target/s390/hotpatch-compile-8.c new file mode 100644 index 000000000..489fc5dd9 --- /dev/null +++ b/gcc-4.9/gcc/testsuite/gcc.target/s390/hotpatch-compile-8.c @@ -0,0 +1,23 @@ +/* Functional tests for the function hotpatching feature. */ + +/* { dg-do run } */ +/* { dg-options "-O3 -mzarch -mhotpatch" } */ + +#include <stdio.h> + +int hp1(void) +{ + int nested1(void) /* { dg-warning "hotpatching is not compatible with nested functions" } */ + { return 1; } + + __attribute__ ((hotpatch)) + int nested2(void) /* { dg-warning "hotpatching is not compatible with nested functions" } */ + { return 1; } + + return nested1() - nested2(); +} + +int main (void) +{ + return hp1(); +} |