http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54619
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: unassig...@gcc.gnu.org ReportedBy: s...@gcc.gnu.org Target: mips*-*-* I am getting a Floating point exception from the compiler while compiling the following small test program with -O2 -mips16. I can reproduce it while using 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 = (n) / sizeof (char); char *pi = (char *) (a); char *pj = (char *) (b); do { *pi++ = *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 ‘qsort’: 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 <http://gcc.gnu.org/bugs.html> 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=30 --param ggc-min-heapsize=4096