Skip to content

Commit f063100

Browse files
author
paolo
committed
2017-10-23 Paolo Carlini <[email protected]>
PR c++/77555 * g++.dg/torture/pr77555.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@254006 138bc75d-0d04-0410-961f-82ee72b054a4
1 parent 79bc162 commit f063100

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

gcc/testsuite/ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2017-10-23 Paolo Carlini <[email protected]>
2+
3+
PR c++/77555
4+
* g++.dg/torture/pr77555.C: New.
5+
16
2017-10-23 Richard Biener <[email protected]>
27

38
PR tree-optimization/82129
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// { dg-do link }
2+
// { dg-options "-std=c++11" }
3+
4+
extern "C" int printf(const char*, ...);
5+
struct A {
6+
A(int, char *p2) { printf(p2); }
7+
};
8+
template <int, typename> struct B { static A static_var; };
9+
template <int LINE, typename GETTER>
10+
A B<LINE, GETTER>::static_var{0, GETTER::get()};
11+
struct C {
12+
void unused() {
13+
static char function_static;
14+
struct D {
15+
static char *get() { return &function_static; }
16+
};
17+
auto addr = B<0, D>::static_var;
18+
}
19+
};
20+
int main() {}

0 commit comments

Comments
 (0)