summaryrefslogtreecommitdiff
path: root/gcc/testsuite/objc/execute/exceptions/trivial.m
blob: 4e55e9d841b45d8aea7a0bde6e92eda61e7454d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <stdlib.h>
#import "../../../objc-obj-c++-shared/Object1.h"

/* do nothing except prove we can compile and link code calling the
   ecceptions mechanism */
   
int main(void)
{
    @try {
	int a = 1 ;
	@throw [Object new];
    }
    @catch (Object *obj) {
  	return 0;
    }
    abort();
}

#import "../../../objc-obj-c++-shared/Object1-implementation.h"