summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.law/arm4.C
blob: bbcf7df239160ca058a38ab37b5d2350b39d540b (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
// { dg-do run  }
// GROUPS passed ARM-compliance
// arm file
// Message-Id: <199301272139.AA25489@world.std.com>
// From: kol@world.std.com (Nikolay Yatsenko)
// Subject: g++ bug
// Date: Wed, 27 Jan 1993 16:39:10 -0500

extern "C" int printf(const char*,...);
int count = 0;

struct S {
  int i;
  S(int b)      {
    i = b;
    count++; }
};

int main(void)
{
  double a = 2.0;

  S x(int (a));
  if (count > 0)
    { printf ("FAIL\n"); return 1; }
  else
    printf ("PASS\n");
  return 0;
}