summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.brendan/scope1.C
blob: f5459410941ac8a91a5cc06cb3ffd31bc369fb44 (plain)
1
2
3
4
5
6
7
8
// { dg-do assemble  }
// GROUPS passed scoping
int f (int i) {
  if (i)
    for (int j = i; j; j--)
      ;
  return j;	// error: j should only be in scope inside the body of `for'// { dg-error "" } .*
}