1 /* Functional tests for the function hotpatching feature.  */
2 
3 /* { dg-do compile } */
4 /* { dg-options "-O3 -mzarch -mhotpatch=1000000,1000000" } */
5 
6 #include <stdio.h>
7 
hp1(void)8 void hp1(void)
9 {
10   printf("hello, world!\n");
11 }
12 
13 __attribute__ ((hotpatch(1000000,1000000)))
hp2(void)14 void hp2(void)
15 {
16   printf("hello, world!\n");
17 }
18 
19 __attribute__ ((hotpatch(1000001,1000000)))
hp3(void)20 void hp3(void)
21 { /* { dg-error " requested .hotpatch. attribute is not a comma separated pair" } */
22   printf("hello, world!\n");
23 }
24 
25 __attribute__ ((hotpatch(1000000,1000001)))
hp4(void)26 void hp4(void)
27 { /* { dg-error " requested .hotpatch. attribute is not a comma separated pair" } */
28   printf("hello, world!\n");
29 }
30