Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.law / arm7.C
blobbd1607768aa203bb6a34191d632a34fd64b47a99
1 // { dg-do run  }
2 // { dg-options "-w" }
3 // GROUPS passed ARM-compliance
4 // arm file (also in cvt file)
5 // Message-Id: <9303061246.AA09402@gjetost.cs.wisc.edu>
6 // From: solomon@cs.wisc.edu (Marvin Solomon)
7 // Subject: Incorrect resolution of conversion path
8 // Date: Sat, 6 Mar 93 06:46:27 -0600
11 extern "C" int printf (const char *, ...);
13 class Base {
14 public:
15         int i;
16         Base(int ii) : i(ii) {}
19 class Derived : public Base {
20 public:
21         Derived(int ii) : Base(ii) {}
22         operator Base&();
25 Derived::operator Base&() {
26         Base *b = new Base(100*i);
27         return *b;
30 int f(Base &b) {
31         if (b.i == 99)
32           { printf ("PASS\n"); return 0; }
33         else
34           { printf ("FAIL\n"); return 1; }
37 int main() {
38         Derived d(99);
39         return f(d);