1 /* Functional tests for the function hotpatching feature.  */
2 
3 /* { dg-do run } */
4 /* { dg-options "-O3 -mzarch -mhotpatch=1" } */
5 
6 #include <stdio.h>
7 
hp1(void)8 void hp1(void)
9 {
10   printf("hello, world!\n");
11 }
12 
hp2(void)13 inline void hp2(void)
14 {
15   printf("hello, world!\n");
16 }
17 
18 __attribute__ ((always_inline))
hp3(void)19 void hp3(void) /* { dg-warning "always_inline function might not be inlinable" } */
20 {
21   printf("hello, world!\n");
22 } /* { dg-warning "function 'hp3' with the 'always_inline' attribute is not hotpatchable" } */
23 
main(void)24 int main (void)
25 {
26   return 0;
27 }
28