OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [objc.dg/] [volatile-1.m] - Blame information for rev 20

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
/* 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>  */
5
 
6
@interface Test
7
-(void) test2: (volatile int) a;
8
@end
9
 
10
@implementation Test
11
-(void) test2: (volatile int) a
12
{
13
  /* The following assignment should NOT be optimized away.  */
14
  a = 1;
15
}
16
@end
17
 
18
/* { dg-final { scan-assembler "li r\[0-9\]+,1" { target powerpc*-*-darwin* } } } */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.