Debian Codegraph @

gcc/testsuite/g++.dg/ipa/pr63621.C

raw
1 // { dg-do compile }
2 // { dg-require-effective-target named_sections }
3 class A
4 {
5 public:
6 int __attribute__((section("a"))) f1(bool);
7 int f2(void *);
8 int f3(bool);
9 };
10
11 inline int A::f1(bool b)
12 {
13 static int c;
14 if (c)
15 ;
16 return 0;
17 }
18
19 inline int A::f3(bool b)
20 {
21 static __attribute__((section(""))) int c;
22 if (c)
23 ;
24 return 0;
25 }
26
27 int A::f2(void *c)
28 {
29 return f1(c) + f3(c);
30 }