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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [objc.dg/] [try-catch-11.m] - Blame information for rev 774

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

Line No. Rev Author Line
1 704 jeremybenn
/* Ensure that typeof()-typed variables inside the @try { } block that
2
   "inherit" their EH-volatileness from other variables in the stack frame
3
   do not trigger "discards qualifiers from target pointer type" warnings.  */
4
 
5
/* { dg-options "-fobjc-exceptions" } */
6
/* { dg-do compile } */
7
 
8
typedef volatile int IOSharedLockData;
9
 
10
@interface TestMyTests
11
- (void) testSpoon;
12
@end
13
 
14
extern void some_func (int *);
15
 
16
@implementation TestMyTests
17
- (void) testSpoon {
18
  int i = 5;
19
 
20
  do {
21
    @try {
22
      typeof(i) j = 6;
23
      some_func (&j);
24
    }
25
    @catch (id exc) {
26
      @throw;
27
    }
28
  } while(0);
29
 
30
  do {
31
    @try {
32
      typeof(i) j = 7;
33
      some_func (&j);
34
    }
35
    @catch (id exc) {
36
      @throw;
37
    }
38
  } while(0);
39
 
40
  do {
41
    @try {
42
      typeof(i) j = 8;
43
      some_func (&j);
44
    }
45
    @catch (id exc) {
46
      @throw;
47
    }
48
  } while(0);
49
 
50
}
51
@end

powered by: WebSVN 2.1.0

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