public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/49522] New: Divide by zero in validate_subreg in emit-rtl.c:695
@ 2011-06-24 17:05 rmansfield at qnx dot com
2011-07-01 16:36 ` [Bug debug/49522] " ramana at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: rmansfield at qnx dot com @ 2011-06-24 17:05 UTC (permalink / raw)
To: gcc-bugs
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 ()
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug debug/49522] Divide by zero in validate_subreg in emit-rtl.c:695
2011-06-24 17:05 [Bug middle-end/49522] New: Divide by zero in validate_subreg in emit-rtl.c:695 rmansfield at qnx dot com
@ 2011-07-01 16:36 ` ramana at gcc dot gnu.org
2011-07-04 9:01 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: ramana at gcc dot gnu.org @ 2011-07-01 16:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49522
Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011.07.01 16:35:45
CC| |ramana at gcc dot gnu.org
Component|middle-end |debug
Ever Confirmed|0 |1
--- Comment #1 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> 2011-07-01 16:35:45 UTC ---
bt
#0 0x08270d79 in validate_subreg (omode=VOIDmode, imode=SImode,
reg=0xb7dae7e8, offset=0) at
/home/ramrad01/sources/fsf/trunk/gcc/emit-rtl.c:695
#1 0x08270fa0 in gen_rtx_SUBREG (mode=VOIDmode, reg=0xb7dae7e8, offset=0) at
/home/ramrad01/sources/fsf/trunk/gcc/emit-rtl.c:775
#2 0x08271027 in gen_lowpart_SUBREG (mode=VOIDmode, reg=0xb7dae7e8) at
/home/ramrad01/sources/fsf/trunk/gcc/emit-rtl.c:790
#3 0x0821c879 in dead_debug_insert_before (all_blocks=0x8dc1364) at
/home/ramrad01/sources/fsf/trunk/gcc/df-problems.c:3197
#4 df_note_bb_compute (all_blocks=0x8dc1364) at
/home/ramrad01/sources/fsf/trunk/gcc/df-problems.c:3399
#5 df_note_compute (all_blocks=0x8dc1364) at
/home/ramrad01/sources/fsf/trunk/gcc/df-problems.c:3452
#6 0x08215c16 in df_analyze_problem (dflow=0x8ddf078,
blocks_to_consider=0x8dc1364, postorder=0x8dc6ad0, n_blocks=3) at
/home/ramrad01/sources/fsf/trunk/gcc/df-core.c:1152
#7 0x08215e6b in df_analyze () at
/home/ramrad01/sources/fsf/trunk/gcc/df-core.c:1249
#8 0x08919a8b in sched_init () at
/home/ramrad01/sources/fsf/trunk/gcc/haifa-sched.c:3487
#9 0x08920472 in haifa_sched_init () at
/home/ramrad01/sources/fsf/trunk/gcc/haifa-sched.c:3526
#10 0x084b87aa in schedule_insns () at
/home/ramrad01/sources/fsf/trunk/gcc/sched-rgn.c:3302
#11 0x084b8e3d in rest_of_handle_sched2 () at
/home/ramrad01/sources/fsf/trunk/gcc/sched-rgn.c:3532
#12 0x0845bb99 in execute_one_pass (pass=0x8c2fd20) at
/home/ramrad01/sources/fsf/trunk/gcc/passes.c:2059
#13 0x0845becd in execute_pass_list (pass=0x8c2fd20) at
/home/ramrad01/sources/fsf/trunk/gcc/passes.c:2114
#14 0x0845bee0 in execute_pass_list (pass=0x8c2f6a0) at
/home/ramrad01/sources/fsf/trunk/gcc/passes.c:2115
#15 0x0845bee0 in execute_pass_list (pass=0x8c2f660) at
/home/ramrad01/sources/fsf/trunk/gcc/passes.c:2115
#16 0x08575621 in tree_rest_of_compilation (fndecl=0xb7d71c00) at
/home/ramrad01/sources/fsf/trunk/gcc/tree-optimize.c:416
#17 0x081f8482 in cgraph_expand_function (node=0xb7cfd668) at
/home/ramrad01/sources/fsf/trunk/gcc/cgraphunit.c:1792
#18 0x081fa41d in cgraph_expand_all_functions () at
/home/ramrad01/sources/fsf/trunk/gcc/cgraphunit.c:1851
#19 cgraph_optimize () at
/home/ramrad01/sources/fsf/trunk/gcc/cgraphunit.c:2121
#20 0x081fab55 in cgraph_finalize_compilation_unit () at
/home/ramrad01/sources/fsf/trunk/gcc/cgraphunit.c:1292
#21 0x080d4090 in c_write_global_declarations () at
/home/ramrad01/sources/fsf/trunk/gcc/c-decl.c:9844
#22 0x08508bc4 in compile_file (argc=5, argv=0xbffff394) at
/home/ramrad01/sources/fsf/trunk/gcc/toplev.c:571
#23 do_compile (argc=5, argv=0xbffff394) at
/home/ramrad01/sources/fsf/trunk/gcc/toplev.c:1908
#24 toplev_main (argc=5, argv=0xbffff394) at
/home/ramrad01/sources/fsf/trunk/gcc/toplev.c:1980
#25 0x081740cb in main (argc=5, argv=0xbffff394) at
/home/ramrad01/sources/fsf/trunk/gcc/main.c:36
(gdb)
It appears as though we are attempting to create a subreg of a clobber
(const_int 0) .
Ramana
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug debug/49522] Divide by zero in validate_subreg in emit-rtl.c:695
2011-06-24 17:05 [Bug middle-end/49522] New: Divide by zero in validate_subreg in emit-rtl.c:695 rmansfield at qnx dot com
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
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-07-04 9:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49522
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |jakub at gcc dot gnu.org
|gnu.org |
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-07-04 09:00:17 UTC ---
Created attachment 24667
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24667
gcc47-pr49522.patch
Untested fix.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug debug/49522] Divide by zero in validate_subreg in emit-rtl.c:695
2011-06-24 17:05 [Bug middle-end/49522] New: Divide by zero in validate_subreg in emit-rtl.c:695 rmansfield at qnx dot com
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
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-07-07 16:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49522
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-07-07 16:06:01 UTC ---
Author: jakub
Date: Thu Jul 7 16:05:55 2011
New Revision: 175987
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=175987
Log:
PR debug/49522
* df-problems.c (dead_debug_reset): Remove dead_debug_uses
referencing debug insns that have been reset.
(dead_debug_insert_before): Don't assert reg is non-NULL,
instead return immediately if it is NULL.
* gcc.dg/debug/pr49522.c: New test.
M gcc/ChangeLog
A gcc/testsuite/gcc.dg/debug/pr49522.c
M gcc/testsuite/ChangeLog
M gcc/df-problems.c
Added:
trunk/gcc/testsuite/gcc.dg/debug/pr49522.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/df-problems.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug debug/49522] Divide by zero in validate_subreg in emit-rtl.c:695
2011-06-24 17:05 [Bug middle-end/49522] New: Divide by zero in validate_subreg in emit-rtl.c:695 rmansfield at qnx dot com
` (2 preceding siblings ...)
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
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-07-07 19:11 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49522
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-07-07 19:10:05 UTC ---
Author: jakub
Date: Thu Jul 7 19:10:01 2011
New Revision: 176003
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=176003
Log:
PR debug/49522
* df-problems.c (dead_debug_reset): Remove dead_debug_uses
referencing debug insns that have been reset.
(dead_debug_insert_before): Don't assert reg is non-NULL,
instead return immediately if it is NULL.
* gcc.dg/debug/pr49522.c: New test.
Added:
branches/gcc-4_6-branch/gcc/testsuite/gcc.dg/debug/pr49522.c
Modified:
branches/gcc-4_6-branch/gcc/ChangeLog
branches/gcc-4_6-branch/gcc/df-problems.c
branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug debug/49522] Divide by zero in validate_subreg in emit-rtl.c:695
2011-06-24 17:05 [Bug middle-end/49522] New: Divide by zero in validate_subreg in emit-rtl.c:695 rmansfield at qnx dot com
` (3 preceding siblings ...)
2011-07-07 19:11 ` jakub at gcc dot gnu.org
@ 2011-07-07 19:18 ` jakub at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-07-07 19:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49522
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-07-07 19:18:22 UTC ---
Should be fixed now.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-07-07 19:18 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-24 17:05 [Bug middle-end/49522] New: Divide by zero in validate_subreg in emit-rtl.c:695 rmansfield at qnx dot com
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
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).