Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / objc.dg / volatile-1.m
bloba71363163924d05007f388fe77db7a43de4e2efc
1 /* Test for proper handling of volatile parameters in ObjC methods.  */
2 /* Contributed by Ziemowit Laski  <zlaski@apple.com>  */
3 /* { dg-do compile } */
4 /* { dg-options "-O2" } */
5 /* { dg-additional-options "-Wno-objc-root-class" } */
7 @interface Test
8 -(void) test2: (volatile int) a;
9 @end
11 @implementation Test
12 -(void) test2: (volatile int) a
14   /* The following assignment should NOT be optimized away.  */
15   a = 1;
17 @end
19 /* { dg-final { scan-assembler "li r\[0-9\]+,1" { target powerpc*-*-darwin* } } } */