summaryrefslogtreecommitdiff
path: root/gcc/testsuite/objc/execute/exceptions/pr31281.m
blob: 41e7a8e16a44c338b13c9a23309b41216cbe355f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* From PR31281.  */
extern void abort (void);
int __attribute__((noinline))
f(unsigned int i)
{
  int j, k;
  @try { } @catch(id) { return 13; }
  for (j=0; j<i; j++)
    for (k=0; k<i; k++)
      {
        @try {
          if (i)
            break;
        } @catch(id) { }
        return 9;
      }
  return 0;
}


int
main()
{
  if (f(1))
    abort ();
  return 0 ;
}