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