repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2015-03-24 Paolo Carlini <paolo.carlini@oracle.com>
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
ipa
/
pr63621.C
blob
3fe3f2f2c4759a138d49ab3b45d28ca351199aa1
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
}