2007-03-01 Paul Brook <paul@codesourcery.com>
[official-gcc.git] / gcc / testsuite / objc.dg / try-catch-9.m
blob5f6daa42bf32705e80d4de068eed52977c993cdd
1 /* Check that taking the address of a local variable marked 'volatile'
2    by the compiler does not generate untoward errors.  */
3 /* Developed by Ziemowit Laski <zlaski@apple.com>.  */
5 /* { dg-options "-fobjc-exceptions" } */
6 /* { dg-do compile } */
9 void foo (int *arg1, int *arg2)
11   *arg1 = *arg2;
14 void bar (int arg) {
15   int rcvr;
17   @try {
18     rcvr = arg;
19   }
20   @finally {
21     int *rcvr0 = &rcvr;
22     foo (rcvr0, &arg);
23   }