aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-cache1.C
blob: 8038b88140d99740cae3b36908398888e9b1a915 (plain)
1
2
3
4
5
6
7
8
9
// PR c++/51433
// { dg-do compile { target c++11 } }

constexpr int f();
constexpr int g() { return f(); }
extern const int n = g();	// dynamic initialization
constexpr int f() { return 42; }
extern const int m = g();
static_assert(m == 42, "m == 42");