PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / objc.dg / volatile-1.m
blob8b5381a9874c31fd3022483041ab8281cab86708
1 /* Test for proper handling of volatile parameters in ObjC methods.  */
2 /* { dg-do compile } */
3 /* { dg-options "-O2" } */
4 /* Contributed by Ziemowit Laski  <zlaski@apple.com>  */
6 @interface Test
7 -(void) test2: (volatile int) a;
8 @end
10 @implementation Test
11 -(void) test2: (volatile int) a
13   /* The following assignment should NOT be optimized away.  */
14   a = 1;
16 @end
18 /* { dg-final { scan-assembler "li r\[0-9\]+,1" { target powerpc*-*-darwin* } } } */