[Bug c/52140] New: ICE in Libdfp testcase when compiled with soft-dfp (no -mcpu).
rsa at us dot ibm.com
gcc-bugzilla@gcc.gnu.org
Mon Feb 6 20:45:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52140
Bug #: 52140
Summary: ICE in Libdfp testcase when compiled with soft-dfp (no
-mcpu).
Classification: Unclassified
Product: gcc
Version: 4.5.4
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: rsa@us.ibm.com
The following Libdfp test-case produces an ICE on PowerPC when compiled w/o
-mcpu (implies soft-dfp) and -O1 or greater optimization:
#ifndef __STDC_WANT_DEC_FP__
#define __STDC_WANT_DEC_FP__
#endif
int
foo (_Decimal64 x, _Decimal64 y)
{
/* This is known to cause a GCC ICE when libdfp is compiled w/o -mcpu and -O1
optimization level or greater. */
return (x < y) || (x > y);
}
int main(void)
{
int ret = -1;
_Decimal64 a = 12.45DD;
_Decimal64 b = 12.43DD;
ret = foo (a,b);
return 0;
}
/opt/at4.0/bin/gcc -v:
Using built-in specs.
COLLECT_GCC=/opt/at4.0/bin/gcc
COLLECT_LTO_WRAPPER=/opt/at4.0/libexec/gcc/powerpc64-linux/4.5.4/lto-wrapper
Target: powerpc64-linux
Configured with: /home/cseo/at4.0/at4.0-5/src/gcc/configure
--build=powerpc64-linux --host=powerpc64-linux --target=powerpc64-linux
--with-cpu=default64 --prefix=/opt/at4.0 --with-long-double-128
--enable-decimal-float --enable-secureplt --enable-threads=posix
--enable-languages=c,c++,fortran --enable-__cxa_atexit --enable-shared
--enable-checking --enable-lto --enable-gnu-indirect-function
--with-gmp-include=/opt/at4.0/include --with-gmp-lib=/opt/at4.0/lib64
--with-mpfr-include=/opt/at4.0/include --with-mpfr-lib=/opt/at4.0/lib64
--with-mpc-include=/opt/at4.0/include --with-mpc-lib=/opt/at4.0/lib64
--with-ppl-include=/opt/at4.0/include --with-ppl-lib=/opt/at4.0/lib64
--with-cloog-include=/opt/at4.0/include --with-cloog-lib=/opt/at4.0/lib64
--with-libelf-include=/opt/at4.0/include --with-libelf-lib=/opt/at4.0/lib64
--with-host-libstdcxx='-L/opt/at4.0/lib64 -lstdc++ -lsupc++ -lppl -lppl_c -lpwl
-lgmp -lgmpxx' --with-cpu=power4 --with-tune=power6
Thread model: posix
gcc version 4.5.4 20110524 (Advance-Toolchain-4.0-5) [ibm/gcc-4_5-branch
revision 179810] (GCC)
/opt/at4.0/bin/gcc -DSHARED -O2 -fpic -g -m32 -c ../tests/test-GCC-PR.c
-D__STDC_DEC_FP__=200704L -D__STDC_WANT_DEC_FP__=1
-DOPTION_EGLIBC_LOCALE_CODE=1 -D_POSIX_C_SOURCE=200809L -std=gnu99
-D_SVID_SOURCE -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute
-Wno-long-long -include ../include/libdfp-symbols.h -include ./config.h
-I../include -I../dfp -I../dfp/decimal -I../libdecnumber/dpd
-I../libdecnumber -I../sysdeps/powerpc/powerpc32
-I../sysdeps/powerpc/fpu/bits -I../sysdeps/powerpc/fpu -I../sysdeps/powerpc
-I../sysdeps/soft-dfp/dpd -I../sysdeps/soft-dfp -I../sysdeps/dpd
-I../decNumberMath/ -I../ieee754/ -I../base-math/ -I.. -I. -o
test-GCC-PR.os
../tests/test-GCC-PR.c:30:1: warning: no previous prototype for 'foo'
../tests/test-GCC-PR.c: In function 'foo':
../tests/test-GCC-PR.c:34:3: internal compiler error: in prepare_float_lib_cmp,
at optabs.c:4414
I've attached the test-GCC-PR.i and test-GCC-PR.s files generated with
--save-temps.
More information about the Gcc-bugs
mailing list