public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/62079] New: [4.9/4.10 Regression] ICE: in calc_dfs_tree, at dominance.c:401 with -fnon-call-exceptions
@ 2014-08-10 10:13 zsojka at seznam dot cz
  2014-08-11  8:49 ` [Bug tree-optimization/62079] " rguenth at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: zsojka at seznam dot cz @ 2014-08-10 10:13 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62079

            Bug ID: 62079
           Summary: [4.9/4.10 Regression] ICE: in calc_dfs_tree, at
                    dominance.c:401 with -fnon-call-exceptions
           Product: gcc
           Version: 4.10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz

Created attachment 33280
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33280&action=edit
partially reduced testcase

Compiler output:
$ gcc -std=c++0x -O2 -fnon-call-exceptions testcase.C
testcase.C: In function 'int main()':
testcase.C:75:1: internal compiler error: in calc_dfs_tree, at dominance.c:401
 }
 ^
0x98b7ab calc_dfs_tree
        /mnt/svn/gcc-trunk/gcc/dominance.c:401
0x98c7c1 calculate_dominance_info(cdi_direction)
        /mnt/svn/gcc-trunk/gcc/dominance.c:662
0x9220a7 flow_loops_find(loops*)
        /mnt/svn/gcc-trunk/gcc/cfgloop.c:414
0xb903c7 loop_optimizer_init(unsigned int)
        /mnt/svn/gcc-trunk/gcc/loop-init.c:92
0x157db93 if_convert
        /mnt/svn/gcc-trunk/gcc/ifcvt.c:4427
0x157fe8d execute
        /mnt/svn/gcc-trunk/gcc/ifcvt.c:4650
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

Tested revisions:
r213777 - ICE
4_9 r212703 - ICE
4_8 r212702 - OK
4_7 r211571 - OK


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

* [Bug tree-optimization/62079] [4.9/4.10 Regression] ICE: in calc_dfs_tree, at dominance.c:401 with -fnon-call-exceptions
  2014-08-10 10:13 [Bug tree-optimization/62079] New: [4.9/4.10 Regression] ICE: in calc_dfs_tree, at dominance.c:401 with -fnon-call-exceptions zsojka at seznam dot cz
@ 2014-08-11  8:49 ` rguenth at gcc dot gnu.org
  2014-08-13 13:17 ` [Bug tree-optimization/62079] [4.9/5 " rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-08-11  8:49 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62079

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2014-08-11
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
   Target Milestone|---                         |4.9.2
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Mine.


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

* [Bug tree-optimization/62079] [4.9/5 Regression] ICE: in calc_dfs_tree, at dominance.c:401 with -fnon-call-exceptions
  2014-08-10 10:13 [Bug tree-optimization/62079] New: [4.9/4.10 Regression] ICE: in calc_dfs_tree, at dominance.c:401 with -fnon-call-exceptions zsojka at seznam dot cz
  2014-08-11  8:49 ` [Bug tree-optimization/62079] " rguenth at gcc dot gnu.org
@ 2014-08-13 13:17 ` rguenth at gcc dot gnu.org
  2014-08-13 14:04 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-08-13 13:17 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62079

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Ok, so this is if-after-reload which calls loop_optimizer_init on a CFG
with an unreachable block.  Thus we miss a cfg-cleanup somewhere.

Note that regular ifcvt runs a cleanup_cfg (CLEANUP_EXPENSIVE), but
not if-after-combine or if-after-reload.

It's peephole2 that ends up with this bogus CFG.

Passes leaving dangling unreachable blocks should fix that up.


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

* [Bug tree-optimization/62079] [4.9/5 Regression] ICE: in calc_dfs_tree, at dominance.c:401 with -fnon-call-exceptions
  2014-08-10 10:13 [Bug tree-optimization/62079] New: [4.9/4.10 Regression] ICE: in calc_dfs_tree, at dominance.c:401 with -fnon-call-exceptions zsojka at seznam dot cz
  2014-08-11  8:49 ` [Bug tree-optimization/62079] " rguenth at gcc dot gnu.org
  2014-08-13 13:17 ` [Bug tree-optimization/62079] [4.9/5 " rguenth at gcc dot gnu.org
@ 2014-08-13 14:04 ` rguenth at gcc dot gnu.org
  2014-08-14  8:57 ` [Bug tree-optimization/62079] [4.9 " rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-08-13 14:04 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62079

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

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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Funny that peep2s peep2_do_cleanup_cfg variable is write-only.  Bernd
introduced that, a simple

Index: recog.c
===================================================================
--- recog.c     (revision 213909)
+++ recog.c     (working copy)
@@ -3553,6 +3553,8 @@ peephole2_optimize (void)
   BITMAP_FREE (live);
   if (peep2_do_rebuild_jump_labels)
     rebuild_jump_labels (get_insns ());
+  if (peep2_do_cleanup_cfg)
+    cleanup_cfg (CLEANUP_CFG_CHANGED);
 }
 #endif /* HAVE_peephole2 */

fixes the testcase.


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

* [Bug tree-optimization/62079] [4.9 Regression] ICE: in calc_dfs_tree, at dominance.c:401 with -fnon-call-exceptions
  2014-08-10 10:13 [Bug tree-optimization/62079] New: [4.9/4.10 Regression] ICE: in calc_dfs_tree, at dominance.c:401 with -fnon-call-exceptions zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2014-08-14  8:57 ` [Bug tree-optimization/62079] [4.9 " rguenth at gcc dot gnu.org
@ 2014-08-14  8:57 ` rguenth at gcc dot gnu.org
  2014-09-09 11:43 ` rguenth at gcc dot gnu.org
  2014-09-09 11:43 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-08-14  8:57 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62079

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Thu Aug 14 08:56:49 2014
New Revision: 213950

URL: https://gcc.gnu.org/viewcvs?rev=213950&root=gcc&view=rev
Log:
2014-08-14  Richard Biener  <rguenther@suse.de>

    PR rtl-optimization/62079
    * recog.c (peephole2_optimize): If peep2_do_cleanup_cfg
    run cleanup_cfg.

    * g++.dg/pr62079.C: New testcase.

Added:
    trunk/gcc/testsuite/g++.dg/pr62079.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/recog.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug tree-optimization/62079] [4.9 Regression] ICE: in calc_dfs_tree, at dominance.c:401 with -fnon-call-exceptions
  2014-08-10 10:13 [Bug tree-optimization/62079] New: [4.9/4.10 Regression] ICE: in calc_dfs_tree, at dominance.c:401 with -fnon-call-exceptions zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2014-08-13 14:04 ` rguenth at gcc dot gnu.org
@ 2014-08-14  8:57 ` rguenth at gcc dot gnu.org
  2014-08-14  8:57 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-08-14  8:57 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62079

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |5.0
            Summary|[4.9/5 Regression] ICE: in  |[4.9 Regression] ICE: in
                   |calc_dfs_tree, at           |calc_dfs_tree, at
                   |dominance.c:401 with        |dominance.c:401 with
                   |-fnon-call-exceptions       |-fnon-call-exceptions
      Known to fail|5.0                         |

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed on trunk sofar.


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

* [Bug tree-optimization/62079] [4.9 Regression] ICE: in calc_dfs_tree, at dominance.c:401 with -fnon-call-exceptions
  2014-08-10 10:13 [Bug tree-optimization/62079] New: [4.9/4.10 Regression] ICE: in calc_dfs_tree, at dominance.c:401 with -fnon-call-exceptions zsojka at seznam dot cz
                   ` (5 preceding siblings ...)
  2014-09-09 11:43 ` rguenth at gcc dot gnu.org
@ 2014-09-09 11:43 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-09-09 11:43 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62079

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
      Known to fail|4.9.2                       |4.9.1

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.


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

* [Bug tree-optimization/62079] [4.9 Regression] ICE: in calc_dfs_tree, at dominance.c:401 with -fnon-call-exceptions
  2014-08-10 10:13 [Bug tree-optimization/62079] New: [4.9/4.10 Regression] ICE: in calc_dfs_tree, at dominance.c:401 with -fnon-call-exceptions zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2014-08-14  8:57 ` rguenth at gcc dot gnu.org
@ 2014-09-09 11:43 ` rguenth at gcc dot gnu.org
  2014-09-09 11:43 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-09-09 11:43 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62079

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Tue Sep  9 11:42:34 2014
New Revision: 215059

URL: https://gcc.gnu.org/viewcvs?rev=215059&root=gcc&view=rev
Log:
2014-09-09  Richard Biener  <rguenther@suse.de>

    Backport from mainline
    2014-08-05  Richard Biener  <rguenther@suse.de>

    PR rtl-optimization/61672
    * emit-rtl.h (mem_attrs_eq_p): Declare.
    * emit-rtl.c (mem_attrs_eq_p): Export.  Handle NULL mem-attrs.
    * cse.c (exp_equiv_p): Use mem_attrs_eq_p.
    * cfgcleanup.c (merge_memattrs): Likewise.
    Include emit-rtl.h.

    2014-08-11  Richard Biener  <rguenther@suse.de>

    PR tree-optimization/62075
    * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Properly
    handle uses in patterns.

    * gcc.dg/vect/pr62075.c: New testcase.

    2014-08-14  Richard Biener  <rguenther@suse.de>

    PR rtl-optimization/62079
    * recog.c (peephole2_optimize): If peep2_do_cleanup_cfg
    run cleanup_cfg.

    * g++.dg/pr62079.C: New testcase.


    2014-08-26  Richard Biener  <rguenther@suse.de>

    PR tree-optimization/62175
    * tree-ssa-loop-niter.c (expand_simple_operations): Do not
    expand possibly trapping operations.

    * g++.dg/torture/pr62175.C: New testcase.

Added:
    branches/gcc-4_9-branch/gcc/testsuite/g++.dg/pr62079.C
    branches/gcc-4_9-branch/gcc/testsuite/g++.dg/torture/pr62175.C
    branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/vect/pr62075.c
Modified:
    branches/gcc-4_9-branch/gcc/ChangeLog
    branches/gcc-4_9-branch/gcc/cfgcleanup.c
    branches/gcc-4_9-branch/gcc/cse.c
    branches/gcc-4_9-branch/gcc/emit-rtl.c
    branches/gcc-4_9-branch/gcc/recog.c
    branches/gcc-4_9-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_9-branch/gcc/tree-ssa-loop-niter.c
    branches/gcc-4_9-branch/gcc/tree-vect-slp.c


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

end of thread, other threads:[~2014-09-09 11:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-10 10:13 [Bug tree-optimization/62079] New: [4.9/4.10 Regression] ICE: in calc_dfs_tree, at dominance.c:401 with -fnon-call-exceptions zsojka at seznam dot cz
2014-08-11  8:49 ` [Bug tree-optimization/62079] " rguenth at gcc dot gnu.org
2014-08-13 13:17 ` [Bug tree-optimization/62079] [4.9/5 " rguenth at gcc dot gnu.org
2014-08-13 14:04 ` rguenth at gcc dot gnu.org
2014-08-14  8:57 ` [Bug tree-optimization/62079] [4.9 " rguenth at gcc dot gnu.org
2014-08-14  8:57 ` rguenth at gcc dot gnu.org
2014-09-09 11:43 ` rguenth at gcc dot gnu.org
2014-09-09 11:43 ` rguenth 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).