1 // PR c++/83634 2 // { dg-do compile } 3 4 void foo()5 foo () 6 { 7 const int x = fn (); // { dg-error "was not declared in this scope" } 8 short n; 9 for (n = x; n < 100; ++n) 10 ; 11 } 12