Expand from SSA.
[gcc.git] / gcc / testsuite / g++.dg / tree-ssa / pr27090.C
1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-optimized" } */
3
4 template <class T>
5 struct Bar
6 {
7 int get() { return static_cast<T*>(this)->get2(); }
8 };
9 struct Foo : public Bar<Foo>
10 {
11 int get2() { return x; }
12 int x;
13 };
14
15 int foo(Foo& f)
16 {
17 return f.get();
18 }
19
20 /* { dg-final { scan-tree-dump "f_..D.->x;" "optimized" } } */
21 /* { dg-final { cleanup-tree-dump "optimized" } } */