Fortran: Fix PR 47485.
[gcc.git] / gcc / testsuite / g++.dg / cpp0x / constexpr-base7.C
blob14e026ec20230297f0416d7adc1da8dfa5cbf8d1
1 // PR c++/91933
2 // { dg-do compile { target c++11 } }
4 struct NoMut1 { int a, b; };
5 struct NoMut3 : NoMut1 {
6   constexpr NoMut3(int a, int b) : NoMut1{a, b} {}
7 };
8 void mutable_subobjects() {
9   constexpr NoMut3 nm3 = {1, 2};
10   struct A {
11     void f() {
12       static_assert(nm3.a == 1, "");
13     }
14   };