public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "sje at gcc dot gnu.org" <gcc-bugzilla@gcc.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	[thread overview]
Message-ID: <bug-54619-4@http.gcc.gnu.org/bugzilla/> (raw)

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: unassigned@gcc.gnu.org
        ReportedBy: sje@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


             reply	other threads:[~2012-09-18 17:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-18 17:08 sje at gcc dot gnu.org [this message]
2012-09-18 18:34 ` [Bug target/54619] " sje at gcc dot gnu.org
2012-11-14 11:20 ` [Bug tree-optimization/54619] " vries at gcc dot gnu.org
2012-11-15 16:50 ` vries at gcc dot gnu.org
2012-11-15 16:55 ` vries at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-54619-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).