gcc/testsuite/g++.dg/cpp0x/pr68348.C
raw| 1 | // PR c++/68348 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | |
| 4 | struct C { |
| 5 | constexpr C() : w(), x(), y() {} |
| 6 | constexpr double fn() const noexcept; |
| 7 | double w; |
| 8 | double x; |
| 9 | double y; |
| 10 | }; |
| 11 | |
| 12 | constexpr double C::fn() const noexcept { return w; } |
| 13 | C foo() |
| 14 | { |
| 15 | C c; |
| 16 | c.fn (); |
| 17 | return c; |
| 18 | } |