diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.target/s390/hotpatch-5.c')
-rw-r--r-- | gcc-4.9/gcc/testsuite/gcc.target/s390/hotpatch-5.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/s390/hotpatch-5.c b/gcc-4.9/gcc/testsuite/gcc.target/s390/hotpatch-5.c new file mode 100644 index 000000000..ec267d65a --- /dev/null +++ b/gcc-4.9/gcc/testsuite/gcc.target/s390/hotpatch-5.c @@ -0,0 +1,21 @@ +/* Functional tests for the function hotpatching feature. */ + +/* { dg-do run } */ +/* { dg-options "-O3 -mzarch -mhotpatch --save-temps" } */ + +#include <stdio.h> + +__attribute__ ((hotpatch)) +void hp1(void) +{ + printf("hello, world!\n"); +} + +int main (void) +{ + return 0; +} + +/* Check number of occurences of certain instructions. */ +/* { dg-final { scan-assembler-times "nopr\t%r7" 12 } } */ +/* { dg-final { scan-assembler-times "nop\t0" 1 } } */ |