public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mikpe at it dot uu.se" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ipa/58345] ICE with SIGFPE at -O1 on x86_64-linux-gnu (affecting trunk and 4.8)
Date: Sun, 08 Sep 2013 08:04:00 -0000	[thread overview]
Message-ID: <bug-58345-4-7XMTL8JRYS@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-58345-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58345

Mikael Pettersson <mikpe at it dot uu.se> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikpe at it dot uu.se

--- Comment #1 from Mikael Pettersson <mikpe at it dot uu.se> ---
I can reproduce with 4.8 and trunk.  Crashes due to division by zero in
fold_array_ctor_reference:

  /* And offset within the access.  */
  inner_offset = offset % (elt_size.to_uhwi () * BITS_PER_UNIT);

Program received signal SIGFPE, Arithmetic exception.
0x00000000005e2448 in fold_array_ctor_reference (ctor=0x7ffff7627ca8,
ctor=0x7ffff7627ca8, from_decl=0x7ffff7535be0, size=0, offset=0,
type=0x7ffff7645540)
    at /mnt/scratch/gcc-4.9-20130901/gcc/gimple-fold.c:2816
2816      inner_offset = offset % (elt_size.to_uhwi () * BITS_PER_UNIT);
(gdb) print elt_size
$1 = {low = 0, high = 0}
(gdb) q

Note that the test case has a static array of an empty struct type.


       reply	other threads:[~2013-09-08  8:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-58345-4@http.gcc.gnu.org/bugzilla/>
2013-09-08  8:04 ` mikpe at it dot uu.se [this message]
2013-09-09  8:34 ` rguenth 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-58345-4-7XMTL8JRYS@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).