summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.mike/eh46.C
blob: 9785e6ad18990a42488c01d7e6fe941ce47652c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// { dg-do assemble }
// { dg-xfail-if "" { arm-*-pe } { "*" } { "" } }
// { dg-options "-fexceptions" }

int atoi(const char *);

struct ios {
 virtual ~ios();
};
 
class fstreambase : virtual public ios {
};

class ifstream : public fstreambase {
};

class ofstream : public fstreambase {
};

extern const short O;
extern const short D;

const short O=  0;
const short D= -3;


short glc(const char* const * const l,
	  short& n,short& x,short& y,
	  ifstream* i,ofstream* o)

{
  n=atoi(l[1]);

  x=atoi(l[2]);
  y=atoi(l[3]);

  if((x < 0)||(y <0))
    {
     return D;
    }

  i = new ifstream[n];
  o = new ofstream[2];

  return O;

}