1 // Test that we don't uselessly instantiate f<A> immediately while parsing g.
2 // Doing so is permitted by the standard, but has no benefit and breaks code
5 // { dg-do compile { target c++11 } }
7 // -O activates the call to maybe_constant_value in cp_fold.
8 // { dg-additional-options -O }
11 constexpr int f (const T* p) { return p->i; }
13 constexpr int g(const struct A* p) { return f(p); }
17 // Instantiating f<A> at EOF works fine.