1 /* Functional tests for the function hotpatching feature.  */
2 
3 /* { dg-do run } */
4 /* { dg-options "-O3 -mzarch -mno-hotpatch --save-temps" } */
5 
6 #include <stdio.h>
7 
8 __attribute__ ((hotpatch(2)))
hp1(void)9 void hp1(void)
10 {
11   printf("hello, world!\n");
12 }
13 
main(void)14 int main (void)
15 {
16   return 0;
17 }
18 
19 /* Check number of occurences of certain instructions.  */
20 /* { dg-final { scan-assembler-times "nopr\t%r7" 2 } } */
21 /* { dg-final { scan-assembler-times "nop\t0" 1 } } */
22