public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/51362] New: [4.7 Regression ICE: SIGFPE (division by zero) in good_cloning_opportunity_p at ipa-cp.c:2401
@ 2011-11-30 18:54 zsojka at seznam dot cz
  2011-12-05 14:16 ` [Bug tree-optimization/51362] [4.7 Regression] " rguenth at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: zsojka at seznam dot cz @ 2011-11-30 18:54 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51362
           Summary: [4.7 Regression ICE: SIGFPE (division by zero) in
                    good_cloning_opportunity_p at ipa-cp.c:2401
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu


Created attachment 25957
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25957
reduced testcase

Compiler output:
$ gcc -O -fipa-cp -fipa-cp-clone testcase.c

(gdb) r
Starting program:
/mnt/svn/gcc-trunk/binary-181788-lto-fortran-checking-yes-rtl-df/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/cc1
-quiet testcase.c -quiet -dumpbase testcase.c -mtune=generic -march=x86-64
-auxbase testcase -O -fipa-cp -fipa-cp-clone -o /tmp/ccinm5Ix.s

Program received signal SIGFPE, Arithmetic exception.
0x0000000001125ed1 in good_cloning_opportunity_p (time_benefit=Unhandled dwarf
expression opcode 0xf3
) at /mnt/svn/gcc-trunk/gcc/ipa-cp.c:1233
1233          int evaluation = (time_benefit * freq_sum) / size_cost;
(gdb) bt
#0  0x0000000001125ed1 in good_cloning_opportunity_p (time_benefit=Unhandled
dwarf expression opcode 0xf3
) at /mnt/svn/gcc-trunk/gcc/ipa-cp.c:1233
#1  0x000000000112b335 in decide_whether_version_node () at
/mnt/svn/gcc-trunk/gcc/ipa-cp.c:2252
#2  ipcp_decision_stage () at /mnt/svn/gcc-trunk/gcc/ipa-cp.c:2401
#3  ipcp_driver () at /mnt/svn/gcc-trunk/gcc/ipa-cp.c:2441
#4  0x00000000008fa7e5 in execute_one_pass (pass=0x17c2180) at
/mnt/svn/gcc-trunk/gcc/passes.c:2074
#5  0x00000000008fafaa in execute_ipa_pass_list (pass=0x17c2180) at
/mnt/svn/gcc-trunk/gcc/passes.c:2441
#6  0x00000000006b1a50 in ipa_passes () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:2076
#7  cgraph_optimize () at /mnt/svn/gcc-trunk/gcc/cgraphunit.c:2147
#8  0x00000000006b1e8a in cgraph_finalize_compilation_unit () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:1327
#9  0x000000000058f970 in c_write_global_declarations () at
/mnt/svn/gcc-trunk/gcc/c-decl.c:10026
#10 0x00000000009efa94 in compile_file (argc=15, argv=0x7fffffffdad8) at
/mnt/svn/gcc-trunk/gcc/toplev.c:581
#11 do_compile (argc=15, argv=0x7fffffffdad8) at
/mnt/svn/gcc-trunk/gcc/toplev.c:1936
#12 toplev_main (argc=15, argv=0x7fffffffdad8) at
/mnt/svn/gcc-trunk/gcc/toplev.c:2012
#13 0x00007ffff6178d2d in __libc_start_main () from /lib64/libc.so.6
#14 0x00000000005731a9 in _start ()

Tested revisions:
r181788 - crash


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug tree-optimization/51362] [4.7 Regression] ICE: SIGFPE (division by zero) in good_cloning_opportunity_p at ipa-cp.c:2401
  2011-11-30 18:54 [Bug tree-optimization/51362] New: [4.7 Regression ICE: SIGFPE (division by zero) in good_cloning_opportunity_p at ipa-cp.c:2401 zsojka at seznam dot cz
@ 2011-12-05 14:16 ` rguenth at gcc dot gnu.org
  2011-12-06 14:29 ` rguenth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-12-05 14:16 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.7.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug tree-optimization/51362] [4.7 Regression] ICE: SIGFPE (division by zero) in good_cloning_opportunity_p at ipa-cp.c:2401
  2011-11-30 18:54 [Bug tree-optimization/51362] New: [4.7 Regression ICE: SIGFPE (division by zero) in good_cloning_opportunity_p at ipa-cp.c:2401 zsojka at seznam dot cz
  2011-12-05 14:16 ` [Bug tree-optimization/51362] [4.7 Regression] " rguenth at gcc dot gnu.org
@ 2011-12-06 14:29 ` rguenth at gcc dot gnu.org
  2011-12-07  8:27 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-12-06 14:29 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug tree-optimization/51362] [4.7 Regression] ICE: SIGFPE (division by zero) in good_cloning_opportunity_p at ipa-cp.c:2401
  2011-11-30 18:54 [Bug tree-optimization/51362] New: [4.7 Regression ICE: SIGFPE (division by zero) in good_cloning_opportunity_p at ipa-cp.c:2401 zsojka at seznam dot cz
  2011-12-05 14:16 ` [Bug tree-optimization/51362] [4.7 Regression] " rguenth at gcc dot gnu.org
  2011-12-06 14:29 ` rguenth at gcc dot gnu.org
@ 2011-12-07  8:27 ` jakub at gcc dot gnu.org
  2011-12-07  8:28 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-12-07  8:27 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011-12-07
                 CC|                            |jakub at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-12-07 08:26:52 UTC ---
This isn't dup of PR50744, it ICEs even with the PR50744 patch.  But with the
patch on the assert that size_cost is non-zero, rather than because of dividing
by zero.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug tree-optimization/51362] [4.7 Regression] ICE: SIGFPE (division by zero) in good_cloning_opportunity_p at ipa-cp.c:2401
  2011-11-30 18:54 [Bug tree-optimization/51362] New: [4.7 Regression ICE: SIGFPE (division by zero) in good_cloning_opportunity_p at ipa-cp.c:2401 zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2011-12-07  8:27 ` jakub at gcc dot gnu.org
@ 2011-12-07  8:28 ` jakub at gcc dot gnu.org
  2011-12-07 10:39 ` jamborm at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-12-07  8:28 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-12-07 08:27:26 UTC ---
*** Bug 51439 has been marked as a duplicate of this bug. ***


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug tree-optimization/51362] [4.7 Regression] ICE: SIGFPE (division by zero) in good_cloning_opportunity_p at ipa-cp.c:2401
  2011-11-30 18:54 [Bug tree-optimization/51362] New: [4.7 Regression ICE: SIGFPE (division by zero) in good_cloning_opportunity_p at ipa-cp.c:2401 zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2011-12-07  8:28 ` jakub at gcc dot gnu.org
@ 2011-12-07 10:39 ` jamborm at gcc dot gnu.org
  2011-12-07 13:04 ` jamborm at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jamborm at gcc dot gnu.org @ 2011-12-07 10:39 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Jambor <jamborm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |jamborm at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #3 from Martin Jambor <jamborm at gcc dot gnu.org> 2011-12-07 10:39:41 UTC ---
Mine.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug tree-optimization/51362] [4.7 Regression] ICE: SIGFPE (division by zero) in good_cloning_opportunity_p at ipa-cp.c:2401
  2011-11-30 18:54 [Bug tree-optimization/51362] New: [4.7 Regression ICE: SIGFPE (division by zero) in good_cloning_opportunity_p at ipa-cp.c:2401 zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2011-12-07 10:39 ` jamborm at gcc dot gnu.org
@ 2011-12-07 13:04 ` jamborm at gcc dot gnu.org
  2011-12-13 14:00 ` jamborm at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jamborm at gcc dot gnu.org @ 2011-12-07 13:04 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Jambor <jamborm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu.org

--- Comment #4 from Martin Jambor <jamborm at gcc dot gnu.org> 2011-12-07 13:03:42 UTC ---
Well, it's estimate_ipcp_clone_size_and_time that returns zero
estimated size growth.  I find that quite strange, I'd never expect
the function to return that, I'd expect a new function clone to
certainly take up some space.  Honza, should I handle the zero size
value or is that the bug that should be addressed?


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug tree-optimization/51362] [4.7 Regression] ICE: SIGFPE (division by zero) in good_cloning_opportunity_p at ipa-cp.c:2401
  2011-11-30 18:54 [Bug tree-optimization/51362] New: [4.7 Regression ICE: SIGFPE (division by zero) in good_cloning_opportunity_p at ipa-cp.c:2401 zsojka at seznam dot cz
                   ` (5 preceding siblings ...)
  2011-12-07 13:04 ` jamborm at gcc dot gnu.org
@ 2011-12-13 14:00 ` jamborm at gcc dot gnu.org
  2011-12-13 15:46 ` jamborm at gcc dot gnu.org
  2011-12-13 15:58 ` jamborm at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: jamborm at gcc dot gnu.org @ 2011-12-13 14:00 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Jambor <jamborm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |http://gcc.gnu.org/ml/gcc-p
                   |                            |atches/2011-12/msg00987.htm
                   |                            |l

--- Comment #5 from Martin Jambor <jamborm at gcc dot gnu.org> 2011-12-13 13:39:36 UTC ---
Patch posted to mailing list:

http://gcc.gnu.org/ml/gcc-patches/2011-12/msg00987.html


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug tree-optimization/51362] [4.7 Regression] ICE: SIGFPE (division by zero) in good_cloning_opportunity_p at ipa-cp.c:2401
  2011-11-30 18:54 [Bug tree-optimization/51362] New: [4.7 Regression ICE: SIGFPE (division by zero) in good_cloning_opportunity_p at ipa-cp.c:2401 zsojka at seznam dot cz
                   ` (6 preceding siblings ...)
  2011-12-13 14:00 ` jamborm at gcc dot gnu.org
@ 2011-12-13 15:46 ` jamborm at gcc dot gnu.org
  2011-12-13 15:58 ` jamborm at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: jamborm at gcc dot gnu.org @ 2011-12-13 15:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Martin Jambor <jamborm at gcc dot gnu.org> 2011-12-13 15:43:39 UTC ---
Author: jamborm
Date: Tue Dec 13 15:43:36 2011
New Revision: 182288

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182288
Log:
2011-12-13  Martin Jambor  <mjambor@suse.cz>

    PR tree-optimization/51362
    * ipa-cp.c (estimate_local_effects): When estimated size of a
    specialized clone is zero, bump it to one.

    * testsuite/gcc.dg/ipa/pr51362.c: New test.


Added:
    trunk/gcc/testsuite/gcc.dg/ipa/pr51362.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ipa-cp.c
    trunk/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug tree-optimization/51362] [4.7 Regression] ICE: SIGFPE (division by zero) in good_cloning_opportunity_p at ipa-cp.c:2401
  2011-11-30 18:54 [Bug tree-optimization/51362] New: [4.7 Regression ICE: SIGFPE (division by zero) in good_cloning_opportunity_p at ipa-cp.c:2401 zsojka at seznam dot cz
                   ` (7 preceding siblings ...)
  2011-12-13 15:46 ` jamborm at gcc dot gnu.org
@ 2011-12-13 15:58 ` jamborm at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: jamborm at gcc dot gnu.org @ 2011-12-13 15:58 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Jambor <jamborm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #7 from Martin Jambor <jamborm at gcc dot gnu.org> 2011-12-13 15:55:50 UTC ---
Fixed.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-12-13 15:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-30 18:54 [Bug tree-optimization/51362] New: [4.7 Regression ICE: SIGFPE (division by zero) in good_cloning_opportunity_p at ipa-cp.c:2401 zsojka at seznam dot cz
2011-12-05 14:16 ` [Bug tree-optimization/51362] [4.7 Regression] " rguenth at gcc dot gnu.org
2011-12-06 14:29 ` rguenth at gcc dot gnu.org
2011-12-07  8:27 ` jakub at gcc dot gnu.org
2011-12-07  8:28 ` jakub at gcc dot gnu.org
2011-12-07 10:39 ` jamborm at gcc dot gnu.org
2011-12-07 13:04 ` jamborm at gcc dot gnu.org
2011-12-13 14:00 ` jamborm at gcc dot gnu.org
2011-12-13 15:46 ` jamborm at gcc dot gnu.org
2011-12-13 15:58 ` jamborm 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).