[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#400484: More information on: gcc-4.1: internal compiler error: in find_lattice_value, at tree-complex.c



I have constructed a minimal test program that reproduces the bug:
Compile with: gcc-4.1 -c -O4 -o test.o test.c 


#include <complex.h>

void testit(double complex* t, double* b)
{
  b[0] = t[0]==0.0?0.0:-t[0];
}

main(void)
{
  static double complex k = 5;
  static double b;
  testit(&k,&b);
}



The following modification fixes the problem:

void testit(double complex* t, double* b)
{
  b[0] = t[0]==0.0?0.0:__real__(-t[0]);
}



Note that the above modification is a default conversion that the
compiler should be able to handle automatically.


Regards,
//Anders



Reply to: