1/* Functional tests for the function hotpatching feature.  */
2
3/* { dg-do compile } */
4/* { dg-options "-O3 -mzarch" } */
5
6#include <stdio.h>
7
8__attribute__ ((hotpatch(1,2)))
9static void hp1(void)
10{
11  printf("hello, world!\n");
12}
13
14__attribute__ ((hotpatch(1,2)))
15static inline void hp2(void)
16{
17  printf("hello, world!\n");
18}
19
20__attribute__ ((hotpatch(0,0)))
21__attribute__ ((always_inline))
22static inline void hp3(void)
23{
24  printf("hello, world!\n");
25}
26
27__attribute__ ((hotpatch(1,2)))
28__attribute__ ((always_inline))
29static inline void hp4(void)
30{
31  printf("hello, world!\n");
32}
33
34void main(void)
35{
36  hp1();
37  hp2();
38  hp3();
39  hp4();
40}
41