blob: 6a79a8c228152e4f2645db5461e06b9bc1313d30 (
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
41
42
43
44
45
46
47
|
/* PR target/32338 */
/* { dg-do link } */
/* { dg-options "-O2 -fno-omit-frame-pointer" } */
struct S
{
};
int
__attribute__((noinline))
foo (struct S *d)
{
return 2;
}
int
__attribute__((noinline))
bar (struct S *d)
{
return 4;
}
int
__attribute__((noinline))
fnl (char const *q)
{
return __builtin_strlen (q);
}
int
__attribute__((noinline))
baz (struct S *d, char const *q)
{
unsigned int len;
len = fnl (q);
if (len > 512)
return bar (d);
return foo (d);
}
int
main (int argc, char *argv[])
{
if (argc > 30)
return baz ((void *) 0, "abcde");
return 0;
}
|