Debian Codegraph @

gcc/testsuite/g++.dg/opt/pr89187.C

raw
1 // PR c++/89187
2 // { dg-do compile { target c++11 } }
3 // { dg-options "-Os -fno-tree-ccp -fno-tree-sra -fno-inline" }
4
5 template <typename T, int N> struct A {
6 typedef T __attribute__((vector_size (N))) type;
7 };
8 template <typename T, int N> using B = typename A<T, N>::type;
9 template <typename T> using C = B<T, 4>;
10 struct D {
11 D (C<int> x) : d{x[3]} {}
12 D foo () { return d; }
13 C<int> d;
14 };
15 extern D d;
16 struct { D bar () { return d; } } l;
17 struct E { void baz () const; };
18
19 void
20 E::baz () const
21 {
22 l.bar ().foo ();
23 }