1 /* Functional tests for the function hotpatching feature. */
2
3 /* { dg-do run } */
4 /* { dg-options "-O3 -mzarch -mhotpatch" } */
5
6 #include <stdio.h>
7
hp1(void)8 int hp1(void)
9 {
10 int nested1(void) /* { dg-warning "hotpatching is not compatible with nested functions" } */
11 { return 1; }
12
13 __attribute__ ((hotpatch))
14 int nested2(void) /* { dg-warning "hotpatching is not compatible with nested functions" } */
15 { return 1; }
16
17 return nested1() - nested2();
18 }
19
main(void)20 int main (void)
21 {
22 return hp1();
23 }
24