public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/46352] New: ICE: division by zero with -fdump-tree-tracer
@ 2010-11-07 21:28 zsojka at seznam dot cz
2010-12-20 14:12 ` [Bug tree-optimization/46352] " zsojka at seznam dot cz
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: zsojka at seznam dot cz @ 2010-11-07 21:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46352
Summary: ICE: division by zero with -fdump-tree-tracer
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: zsojka@seznam.cz
----- testcase.c -----
void foo (void)
{
return;
label:;
}
----------------------
Compiler output:
$ gcc -O -freorder-blocks -ftracer -fdump-tree-tracer testcase.c
testcase.c: In function 'foo':
testcase.c:1:6: 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.
Tested revisions:
r166414 - crash
4.3.5 - crash
4.2.4 - doesn't know -fdump-tree-tracer
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/46352] ICE: division by zero with -fdump-tree-tracer
2010-11-07 21:28 [Bug tree-optimization/46352] New: ICE: division by zero with -fdump-tree-tracer zsojka at seznam dot cz
@ 2010-12-20 14:12 ` zsojka at seznam dot cz
2013-04-04 5:38 ` mpolacek at gcc dot gnu.org
2021-08-09 1:14 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: zsojka at seznam dot cz @ 2010-12-20 14:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46352
--- Comment #1 from Zdenek Sojka <zsojka at seznam dot cz> 2010-12-20 14:12:19 UTC ---
Backtrace for r165699:
The offending line is:
fprintf (dump_file, "Duplicated %i insns (%i%%)\n", nduplicated,
nduplicated * 100 / ninsns);
Program received signal SIGFPE, Arithmetic exception.
0x000000000088a835 in tail_duplicate () at /mnt/svn/gcc-trunk/gcc/tracer.c:338
338 fprintf (dump_file, "Duplicated %i insns (%i%%)\n", nduplicated,
(gdb) bt
#0 0x000000000088a835 in tail_duplicate () at
/mnt/svn/gcc-trunk/gcc/tracer.c:338
#1 tracer () at /mnt/svn/gcc-trunk/gcc/tracer.c:364
#2 0x000000000079613f in execute_one_pass (pass=0x155f000) at
/mnt/svn/gcc-trunk/gcc/passes.c:1562
#3 0x00000000007963d5 in execute_pass_list (pass=0x155f000) at
/mnt/svn/gcc-trunk/gcc/passes.c:1617
#4 0x00000000007963e7 in execute_pass_list (pass=0x155fd80) at
/mnt/svn/gcc-trunk/gcc/passes.c:1618
#5 0x00000000008e30f6 in tree_rest_of_compilation (fndecl=0x7ffff5aadf00) at
/mnt/svn/gcc-trunk/gcc/tree-optimize.c:419
#6 0x0000000000aac342 in cgraph_expand_function (node=0x7ffff5acc000) at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:1494
#7 0x0000000000aae90a in cgraph_expand_all_functions () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:1553
#8 cgraph_optimize () at /mnt/svn/gcc-trunk/gcc/cgraphunit.c:1809
#9 0x0000000000aaee6a in cgraph_finalize_compilation_unit () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:1016
#10 0x00000000004ab4b4 in c_write_global_declarations () at
/mnt/svn/gcc-trunk/gcc/c-decl.c:9822
#11 0x0000000000889934 in compile_file (argc=16, argv=0x7fffffffdac8) at
/mnt/svn/gcc-trunk/gcc/toplev.c:931
#12 do_compile (argc=16, argv=0x7fffffffdac8) at
/mnt/svn/gcc-trunk/gcc/toplev.c:2363
#13 toplev_main (argc=16, argv=0x7fffffffdac8) at
/mnt/svn/gcc-trunk/gcc/toplev.c:2423
#14 0x00007ffff6371bbd in __libc_start_main () from /lib/libc.so.6
#15 0x00000000004920b9 in _start ()
(gdb) p nduplicated
$1 = 0
(gdb) p ninsns
$2 = <value optimized out>
I can't reproduce it in current trunk, but I don't know if it was fixed or just
hidden.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/46352] ICE: division by zero with -fdump-tree-tracer
2010-11-07 21:28 [Bug tree-optimization/46352] New: ICE: division by zero with -fdump-tree-tracer zsojka at seznam dot cz
2010-12-20 14:12 ` [Bug tree-optimization/46352] " zsojka at seznam dot cz
@ 2013-04-04 5:38 ` mpolacek at gcc dot gnu.org
2021-08-09 1:14 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-04-04 5:38 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46352
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> 2013-04-04 05:37:59 UTC ---
Does not happen anymore, but the issue is maybe still latent; we'd need 3+ BBs
and the sum of insns in them would have to be 0.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/46352] ICE: division by zero with -fdump-tree-tracer
2010-11-07 21:28 [Bug tree-optimization/46352] New: ICE: division by zero with -fdump-tree-tracer zsojka at seznam dot cz
2010-12-20 14:12 ` [Bug tree-optimization/46352] " zsojka at seznam dot cz
2013-04-04 5:38 ` mpolacek at gcc dot gnu.org
@ 2021-08-09 1:14 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-09 1:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46352
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Known to work| |4.7.0
Resolution|--- |FIXED
Target Milestone|--- |4.7.0
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This condition will never happen in 4.7.0+.
Because we will not have the case where we have one BB there:
if (n_basic_blocks_for_fn (fun) <= NUM_FIXED_BLOCKS + 1)
return 0;
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-08-09 1:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-07 21:28 [Bug tree-optimization/46352] New: ICE: division by zero with -fdump-tree-tracer zsojka at seznam dot cz
2010-12-20 14:12 ` [Bug tree-optimization/46352] " zsojka at seznam dot cz
2013-04-04 5:38 ` mpolacek at gcc dot gnu.org
2021-08-09 1:14 ` pinskia 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).