repo.or.cz
/
gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
ipa-cp: Perform operations in the appropriate types (PR 118097)
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
template
/
anonunion3.C
blob
6ab7d1007640c8a7dac2df24e74fe338b5ea729a
1
// PR c++/86182
2
// { dg-do compile { target c++11 } }
3
4
extern "C" int printf (const char *, ...);
5
6
template<typename T> static char const * f(T *t) {
7
T u(*t);
8
u.x = "hello world";
9
printf("%s\n", u.x);
10
return "initialized";
11
}
12
13
int main() {
14
union { char const *x = f(this); };
15
printf("%s\n", x);
16
}