1 // Test that s.i is not modified by the assume.
2 // { dg-do compile { target c++17 } }
8 constexpr string (const char *p): p(p), i(0) { }
9 constexpr int length () { ++i; return __builtin_strlen (p); }
15 [[assume (s.length () > 0)]];
16 if (s.i != 0) __builtin_abort();
17 int len = s.length ();
18 if (s.i != 1) __builtin_abort();