* g++.dg/ext/java-3.C: Don't compile on AIX.
[official-gcc.git] / gcc / testsuite / g++.dg / ext / java-3.C
blob128db653116dae0768fdf7d773ca0e19309d3d5e
1 // PR c++/70267
2 // { dg-do compile { target { ! { powerpc-ibm-aix* } } } }
3 // { dg-options "-O2" }
5 extern "Java"
7   typedef __java_int jint;
8   namespace java
9   {
10     namespace lang
11     {
12       class Class;
13       class Object;
14       class Throwable {};
15       class Foo;
16     }
17   }
18
20 typedef struct java::lang::Object * jobject;
21 typedef struct java::lang::Throwable * jthrowable;
22 typedef class  java::lang::Class * jclass;
24 using java::lang::Foo;
26 class Foo: public java::lang::Throwable
28   public:static::java::lang::Class class$;
31 extern "C" Foo _Jv_AllocObject (jclass);
32 extern "C" void _Jv_Throw (jthrowable) __attribute__ ((__noreturn__));
34 void 
35 Bar4 (void)
37   Foo * f = new java::lang::Foo;        // { dg-error "is not a function returning a pointer" }
38   throw (f);