From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6340 invoked by alias); 22 Aug 2007 11:54:57 -0000 Received: (qmail 5044 invoked by uid 48); 22 Aug 2007 11:54:47 -0000 Date: Wed, 22 Aug 2007 11:54:00 -0000 Subject: [Bug c/33147] New: ICE: SEGV compiling for -mcpu=ep9312 -mfpu-maverick -mhard-float -O X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "martinwguy at yahoo dot it" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-08/txt/msg01553.txt.bz2 This file: void t(double foo) { puts(foo <= 1.0 ? "foo" : "bar"); } provokes ICE segfault when compiled with gcc -O -mfpu=maverick -mcpu=ep9312 -mhard-float -c t.c Confirmed same behaviour in: - native Debian "armel" gcc-4.1.3 arm-linux-gnueabi - native Debian "arm" gcc-4.1.2 on arm-linux-gnu - cross-compiler gcc-4.1.1 on i386-linux-gnu target arm-linux-gnueabi The SEGV goes away if -msoft-float is used instead of -mhard-float; removing -O also makes the compilation succeed. Strangely, explicitly supplying the -f flags that -O is said to enable: -fdefer-pop -fdelayed-branch -fguess-branch-probability -fcprop-registers -floop-optimize -fif-conversion -fif-conversion2 -ftree-ccp -ftree-dce -ftree-dominator-opts -ftree-dse -ftree-ter -ftree-lrs -ftree-sra -ftree-copyrename -ftree-fre -ftree-ch -funit-at-a-time -fmerge-constants -fomit-frame-pointer does not provoke the segfault, but adding -O to the the list does. Here are the native gcc-4.1.3 details: Target: arm-linux-gnueabi Configured with: ../src/configure -v --enable-languages=c,c++,fortran,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.1.3 --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --disable-libssp --enable-checking=release arm-linux-gnueabi Thread model: posix gcc version 4.1.3 20070812 (prerelease) (Debian 4.1.2-15) Output: t.c: In function 't': t.c:4: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. -- Summary: ICE: SEGV compiling for -mcpu=ep9312 -mfpu-maverick - mhard-float -O Product: gcc Version: 4.1.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: martinwguy at yahoo dot it GCC build triplet: arm-linux-gnueabi GCC host triplet: arm-linux-gnueabi GCC target triplet: arm-linux-gnueabi http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33147