public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rmansfield at qnx dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/49522] New: Divide by zero in validate_subreg in emit-rtl.c:695
Date: Fri, 24 Jun 2011 17:05:00 -0000	[thread overview]
Message-ID: <bug-49522-4@http.gcc.gnu.org/bugzilla/> (raw)

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

           Summary: Divide by zero in validate_subreg in emit-rtl.c:695
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: rmansfield@qnx.com
              Host: x86_64-linux-gnu
            Target: arm-unknown-linux-gnueabi
             Build: x86_64-linux-gnu


Created attachment 24592
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24592
preprocessed source

$ ./xgcc -v
Using built-in specs.
COLLECT_GCC=./xgcc
Target: arm-unknown-linux-gnueabi
Configured with: ../configure --target=arm-unknown-linux-gnueabi
--prefix=/home/ryan/x-tools/arm-unknown-linux-gnueabi
--with-sysroot=/home/ryan/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi//sys-root
--disable-multilib
--with-local-prefix=/home/ryan/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/sys-root
--disable-nls --enable-threads=posix --enable-symvers=gnu --enable-c99
--enable-long-long --enable-target-optspace
target_alias=arm-unknown-linux-gnueabi --enable-languages=c++ --disable-shared
--disable-libmudflap --disable-libssp
Thread model: posix
gcc version 4.7.0 20110624 (experimental) [trunk revision 175378] (GCC) 

$ ./xgcc -B. ~/ice.i -c -O3 -g
/home/ryan/ice.i: In function 'func4':
/home/ryan/ice.i:38:1: internal compiler error: Floating point exception
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Doesn't crash without -g

Program received signal SIGFPE, Arithmetic exception.
validate_subreg (omode=VOIDmode, imode=SImode, reg=0x7ffff6e33a70, offset=0)
    at ../../gcc/emit-rtl.c:695
695      if (offset % osize != 0)
(gdb) bt
#0  validate_subreg (omode=VOIDmode, imode=SImode, reg=0x7ffff6e33a70, 
    offset=0) at ../../gcc/emit-rtl.c:695
#1  0x0000000000616849 in gen_rtx_SUBREG (mode=VOIDmode, reg=0x7ffff6e33a70, 
    offset=0) at ../../gcc/emit-rtl.c:775
#2  0x00000000005c82b8 in dead_debug_insert_before (
    all_blocks=<value optimized out>) at ../../gcc/df-problems.c:3197
#3  df_note_bb_compute (all_blocks=<value optimized out>)
    at ../../gcc/df-problems.c:3399
#4  df_note_compute (all_blocks=<value optimized out>)
    at ../../gcc/df-problems.c:3452
#5  0x00000000005c14c9 in df_analyze_problem (dflow=0x144d220, 
    blocks_to_consider=0x141de88, postorder=0x13fbb50, n_blocks=3)
    at ../../gcc/df-core.c:1152
#6  0x00000000005c1729 in df_analyze () at ../../gcc/df-core.c:1249
#7  0x0000000000c50dcb in sched_init () at ../../gcc/haifa-sched.c:3487
#8  0x0000000000c575cb in haifa_sched_init () at ../../gcc/haifa-sched.c:3526
#9  0x00000000008211f5 in schedule_insns () at ../../gcc/sched-rgn.c:3302
#10 0x00000000008217dd in rest_of_handle_sched2 ()
    at ../../gcc/sched-rgn.c:3532
#11 0x00000000007c5b30 in execute_one_pass (pass=0x1252d20)
    at ../../gcc/passes.c:2059
---Type <return> to continue, or q <return> to quit---
#12 0x00000000007c5e55 in execute_pass_list (pass=0x1252d20)
    at ../../gcc/passes.c:2114
#13 0x00000000007c5e67 in execute_pass_list (pass=0x1252300)
    at ../../gcc/passes.c:2115
#14 0x00000000007c5e67 in execute_pass_list (pass=0x12522a0)
    at ../../gcc/passes.c:2115
#15 0x00000000008cd728 in tree_rest_of_compilation (fndecl=0x7ffff7fa5100)
    at ../../gcc/tree-optimize.c:416
#16 0x00000000005a6546 in cgraph_expand_function (node=0x7ffff7f96480)
    at ../../gcc/cgraphunit.c:1792
#17 0x00000000005a82ea in cgraph_expand_all_functions ()
    at ../../gcc/cgraphunit.c:1851
#18 cgraph_optimize () at ../../gcc/cgraphunit.c:2121
#19 0x00000000005a897a in cgraph_finalize_compilation_unit ()
    at ../../gcc/cgraphunit.c:1292
#20 0x000000000049b4d8 in c_write_global_declarations ()
    at ../../gcc/c-decl.c:9844
#21 0x000000000086ad66 in compile_file (argc=15, argv=0x7fffffffe0b8)
    at ../../gcc/toplev.c:571
#22 do_compile (argc=15, argv=0x7fffffffe0b8) at ../../gcc/toplev.c:1908
#23 toplev_main (argc=15, argv=0x7fffffffe0b8) at ../../gcc/toplev.c:1980
---Type <return> to continue, or q <return> to quit---
#24 0x00007ffff718deff in __libc_start_main (main=0x52de00 <main>, argc=15, 
    ubp_av=0x7fffffffe0b8, init=<value optimized out>, 
    fini=<value optimized out>, rtld_fini=<value optimized out>, 
    stack_end=0x7fffffffe0a8) at libc-start.c:226
#25 0x000000000047f669 in _start ()


             reply	other threads:[~2011-06-24 17:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-24 17:05 rmansfield at qnx dot com [this message]
2011-07-01 16:36 ` [Bug debug/49522] " ramana at gcc dot gnu.org
2011-07-04  9:01 ` jakub at gcc dot gnu.org
2011-07-07 16:06 ` jakub at gcc dot gnu.org
2011-07-07 19:11 ` jakub at gcc dot gnu.org
2011-07-07 19:18 ` jakub 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-49522-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).