1 // PR c++/87372
2 // { dg-do compile { target c++14 } }
3 
4 constexpr int
foo(char const * s)5 foo (char const *s)
6 {
7   int i = 0;
8   while (s[i])
9     ++i;
10   return i;
11 }
12 
13 constexpr int
bar()14 bar ()
15 {
16   constexpr int l = foo (__PRETTY_FUNCTION__);
17   constexpr int l2 = foo (__FUNCTION__);
18   constexpr int l3 = foo (__func__);
19   return l + l2 + l3;
20 }
21 static_assert (bar () == 25, "");
22