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

Bug#305344: gcc-3.4: compile-time NaN triggers ICE



Package: gcc-3.4
Version: 3.4.3-12
Severity: normal

Hello!

The following code triggers an ICE:

/** @file ct_nan.c trigger an ICE with gcc-3.4 */
#include <stdio.h>
#include <math.h>
#include <float.h>
#include <complex.h>

int main(void)
{
	double complex oops = ((1.0L+ 1.0L*I)/0.0L);
	printf("oops = %.5f, %.5f\n", creal(oops), cimag(oops));
	return 0;
}

$ CFLAGS="" CPPFLAGS="" gcc-3.4 -save-temps -o ct_nan ct_nan.c                                     
ct_nan.c: In function `main':                                                                                          
ct_nan.c:8: internal compiler error: Segmentation fault                                                                
Please submit a full bug report,                                                                                       
with preprocessed source if appropriate.                                                                               
See <URL:http://gcc.gnu.org/bugs.html> for instructions.                                                               
For Debian GNU/Linux specific bug reporting instructions,                                                              
see <URL:file:///usr/share/doc/gcc-3.4/README.Bugs>. 

gcc-3.4 from sid has such a problem too.

Note, that  gcc-3.3 compiles this code:

$ CFLAGS="" CPPFLAGS="" gcc-3.3 -save-temps -o ct_nan ct_nan.c
$ ./ct_nan
oops = nan, nan


-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.11.5
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8)

Versions of packages gcc-3.4 depends on:
ii  binutils                    2.15-5       The GNU assembler, linker and bina
ii  cpp-3.4                     3.4.3-12     The GNU C preprocessor
ii  gcc-3.4-base                3.4.3-12     The GNU Compiler Collection (base 
ii  libc6                       2.3.2.ds1-20 GNU C Library: Shared libraries an
ii  libgcc1                     1:3.4.3-12   GCC support library

-- no debconf information

--
Best regards, 
  Alexei



Reply to: