1// { dg-do run } 2// { dg-options "" } 3 4// This test makes sure that the stuff in lex.c (real_yylex) is 5// set up to handle real and imag numbers correctly. This test is against 6// a bug where the compiler was not converting the integer `90' to a 7// complex number, unless you did `90.0'. Fixed 10/1/1997. 8 9extern "C" { 10int printf (const char *, ...); 11void exit (int); 12void abort (void); 13} 14 15__complex__ double cd; 16 17int one = 1; 18 19int 20main() 21{ 22 cd = 1.0+90i; 23 cd *= one; 24 25 if (__real__ cd != 1 || __imag__ cd != 90) 26 abort (); 27 28 exit (0); 29} 30