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
tree-optimization/116481 - avoid building function_type[]
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp1y
/
pr94066-3.C
blob
175018acf86bfe1008838df7fa2d3e43b2ff73bf
1
// PR c++/94066
2
// { dg-do compile { target c++14 } }
3
4
union U;
5
constexpr int foo(U *up);
6
7
union U {
8
int a = foo(this); int y;
9
};
10
11
constexpr int foo(U *up) {
12
up->y = 11; // { dg-error "'U::a' to 'U::y'" }
13
return {42};
14
}
15
16
extern constexpr U u = {};