OSDN Git Service

* cpplib.h (cpp_reader): Remove if_stack. Change
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.brendan / complex1.C
1 // Special g++ Options:
2
3 // This test makes sure that the stuff in lex.c (real_yylex) is
4 // set up to handle real and imag numbers correctly.  This test is against
5 // a bug where the compiler was not converting the integer `90' to a
6 // complex number, unless you did `90.0'.  Fixed 10/1/1997.
7
8 extern "C" {
9 int printf (const char *, ...);
10 void exit (int);
11 void abort (void);
12 };
13
14 __complex__ double cd;
15
16 int one = 1;
17
18 int
19 main()
20 {
21   cd = 1.0+90i;
22   cd *= one;
23
24   if (__real__ cd != 1 || __imag__ cd != 90)
25     abort ();
26
27   exit (0);
28 }