Fortran: Fix PR 47485.
[gcc.git] / gcc / testsuite / g++.dg / torture / phi-1.C
blob69fb3d7ba385709236304456a96c6146302c76cb
1 // { dg-do compile { target c++11 } }
2 // { dg-options "--param early-inlining-insns=14" }
4 struct Element;
5 template <int _Nm> struct __array_traits { typedef Element _Type[_Nm]; };
6 template <int _Nm> struct array {
7   typename __array_traits<_Nm>::_Type _M_elems;
8 };
9 bool logLevel();
10 struct LogCapture {
11   void stream();
13 struct Element {
14   Element();
15   long data_;
17 using ElementArray = array<6>;
18 struct ElementManager {
19   ElementManager();
20   ElementArray array_;
22 static ElementArray makeArray() {
23   if (logLevel())
24     LogCapture().stream();
25   ElementArray foo;
26   return foo;
28 ElementManager::ElementManager() : array_(makeArray()) {}