PR tree-optimization/86415 - strlen() not folded for substrings within constant arrays
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / constexpr-loop6.C
blobe49e53193d1c0a6a660c91934ff796974d073336
1 // PR c++/65970
2 // { dg-do compile { target c++14 } }
3 // { dg-options -fconstexpr-loop-limit=5 }
5 constexpr int foo() {
6   while (true)                  // { dg-error "-fconstexpr-loop-limit" }
7     ;
8   return 0;
11 constexpr int i = foo();        // { dg-message "" }