From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12113 invoked by alias); 18 Sep 2012 17:08:19 -0000 Received: (qmail 12097 invoked by uid 22791); 18 Sep 2012 17:08:17 -0000 X-SWARE-Spam-Status: No, hits=-3.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 18 Sep 2012 17:08:04 +0000 From: "sje at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/54619] New: GCC aborts during compilation with '-O2 -mips16' Date: Tue, 18 Sep 2012 17:08:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sje at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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: 2012-09/txt/msg01361.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D54619 Bug #: 54619 Summary: GCC aborts during compilation with '-O2 -mips16' Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassigned@gcc.gnu.org ReportedBy: sje@gcc.gnu.org Target: mips*-*-* I am getting a Floating point exception from the compiler while compiling t= he following small test program with -O2 -mips16. I can reproduce it while us= ing a native or cross compiler targeting mips and while generating code for big= or little endian. I could also reproduce it on targets for linux and for elf. % cat q.c swapfunc(char *a , char *b , int n , int swaptype) { long i =3D (n) / sizeof (char); char *pi =3D (char *) (a); char *pj =3D (char *) (b); do { *pi++ =3D *pj; } while (--i > 0); } qsort(void *a) { char *pb; int r; int swaptype; swapfunc(a, pb - r, r, swaptype); } % obj*/gcc/initial/gcc/cc1 -quiet -mel -O2 -mips16 q.c q.c: In function =E2=80=98qsort=E2=80=99: q.c:10:1: internal compiler error: Floating point exception qsort(void *a) ^ Please submit a full bug report, with preprocessed source if appropriate. See for instructions. % obj*/gcc/gcc/cc1 -version GNU C (GCC) version 4.8.0 20120913 (experimental) (mipsel-unknown-linux-gnu) compiled by GNU C version 4.8.0 20120913 (experimental), GMP version 4.= 3.2, MPFR version 3.0.0-p3, MPC version 0.8.2 GGC heuristics: --param ggc-min-expand=3D30 --param ggc-min-heapsize=3D4096