public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/52045] New: [4.7 Regression] ICE: in execute_todo, at passes.c:1748 with -O3 -ftracer -fno-tree-ccp -fno-tree-copy-prop -fno-tree-dce and stpcpy_chk()
@ 2012-01-29 19:11 zsojka at seznam dot cz
  2012-01-30  4:16 ` [Bug middle-end/52045] " jakub at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: zsojka at seznam dot cz @ 2012-01-29 19:11 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 52045
           Summary: [4.7 Regression] ICE: in execute_todo, at
                    passes.c:1748 with -O3 -ftracer -fno-tree-ccp
                    -fno-tree-copy-prop -fno-tree-dce and stpcpy_chk()
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu


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

Compiler output:
$ gcc -O3 -ftracer -fno-tree-ccp -fno-tree-copy-prop -fno-tree-dce testcase.c   
testcase.c: In function 'foo':
testcase.c:5:1: internal compiler error: in execute_todo, at passes.c:1748
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

(gdb) bt
#0  fancy_abort (file=0x1289e58 "/mnt/svn/gcc-trunk/gcc/passes.c", line=1748,
function=0x128a409 "execute_todo")
    at /mnt/svn/gcc-trunk/gcc/diagnostic.c:898
#1  0x00000000008f8705 in execute_todo (flags=32768) at
/mnt/svn/gcc-trunk/gcc/passes.c:1748
#2  0x00000000008fb91e in execute_one_pass (pass=0x17cac00) at
/mnt/svn/gcc-trunk/gcc/passes.c:2104
#3  0x00000000008fbca5 in execute_pass_list (pass=0x17cac00) at
/mnt/svn/gcc-trunk/gcc/passes.c:2136
#4  0x0000000000a5dffe in tree_rest_of_compilation (fndecl=0x7ffff5ba6e00) at
/mnt/svn/gcc-trunk/gcc/tree-optimize.c:420
#5  0x00000000006afe3a in cgraph_expand_function (node=0x7ffff5a976c0) at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:1819
#6  0x00000000006b1d0c in cgraph_expand_all_functions () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:1886
#7  cgraph_optimize () at /mnt/svn/gcc-trunk/gcc/cgraphunit.c:2200
#8  0x00000000006b236a in cgraph_finalize_compilation_unit () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:1328
#9  0x000000000058ec20 in c_write_global_declarations () at
/mnt/svn/gcc-trunk/gcc/c-decl.c:10030
#10 0x00000000009f081c in compile_file () at
/mnt/svn/gcc-trunk/gcc/toplev.c:573
#11 do_compile () at /mnt/svn/gcc-trunk/gcc/toplev.c:1938
#12 toplev_main (argc=17, argv=0x7fffffffd838) at
/mnt/svn/gcc-trunk/gcc/toplev.c:2014
#13 0x00007ffff61cc09d in __libc_start_main () from /lib64/libc.so.6
#14 0x0000000000572321 in _start ()

Tested revisions:
r183666 - crash
r180540 - crash
r178498 - OK
4.6 r180325 - OK


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

* [Bug middle-end/52045] [4.7 Regression] ICE: in execute_todo, at passes.c:1748 with -O3 -ftracer -fno-tree-ccp -fno-tree-copy-prop -fno-tree-dce and stpcpy_chk()
  2012-01-29 19:11 [Bug middle-end/52045] New: [4.7 Regression] ICE: in execute_todo, at passes.c:1748 with -O3 -ftracer -fno-tree-ccp -fno-tree-copy-prop -fno-tree-dce and stpcpy_chk() zsojka at seznam dot cz
@ 2012-01-30  4:16 ` jakub at gcc dot gnu.org
  2012-01-30  9:35 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-30  4:16 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-01-30
                 CC|                            |jakub at gcc dot gnu.org
   Target Milestone|---                         |4.7.0
     Ever Confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-30 00:10:24 UTC ---
Started with http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=178527


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

* [Bug middle-end/52045] [4.7 Regression] ICE: in execute_todo, at passes.c:1748 with -O3 -ftracer -fno-tree-ccp -fno-tree-copy-prop -fno-tree-dce and stpcpy_chk()
  2012-01-29 19:11 [Bug middle-end/52045] New: [4.7 Regression] ICE: in execute_todo, at passes.c:1748 with -O3 -ftracer -fno-tree-ccp -fno-tree-copy-prop -fno-tree-dce and stpcpy_chk() zsojka at seznam dot cz
  2012-01-30  4:16 ` [Bug middle-end/52045] " jakub at gcc dot gnu.org
@ 2012-01-30  9:35 ` rguenth at gcc dot gnu.org
  2012-01-30 13:35 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-01-30  9:35 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-30 09:25:56 UTC ---
Mine then.


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

* [Bug middle-end/52045] [4.7 Regression] ICE: in execute_todo, at passes.c:1748 with -O3 -ftracer -fno-tree-ccp -fno-tree-copy-prop -fno-tree-dce and stpcpy_chk()
  2012-01-29 19:11 [Bug middle-end/52045] New: [4.7 Regression] ICE: in execute_todo, at passes.c:1748 with -O3 -ftracer -fno-tree-ccp -fno-tree-copy-prop -fno-tree-dce and stpcpy_chk() zsojka at seznam dot cz
  2012-01-30  4:16 ` [Bug middle-end/52045] " jakub at gcc dot gnu.org
  2012-01-30  9:35 ` rguenth at gcc dot gnu.org
@ 2012-01-30 13:35 ` rguenth at gcc dot gnu.org
  2012-01-30 13:48 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-01-30 13:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-30 12:25:02 UTC ---
This is a case similar to PR22037, see execute_function_todo, passes calling
cleanup_tree_cfg need to expect to update SSA form.

      bool cleanup = cleanup_tree_cfg ();

      if (cleanup && (cfun->curr_properties & PROP_ssa))
        flags |= TODO_remove_unused_locals;

      /* When cleanup_tree_cfg merges consecutive blocks, it may
         perform some simplistic propagation when removing single
         valued PHI nodes.  This propagation may, in turn, cause the
         SSA form to become out-of-date (see PR 22037).  So, even
         if the parent pass had not scheduled an SSA update, we may
         still need to do one.  */
      if (!(flags & TODO_update_ssa_any) && need_ssa_update_p (cfun))
        flags |= TODO_update_ssa;

the reasoning here is similar.

Index: gcc/tree-optimize.c
===================================================================
--- gcc/tree-optimize.c (revision 183695)
+++ gcc/tree-optimize.c (working copy)
@@ -157,7 +157,9 @@ struct gimple_opt_pass pass_all_early_op
 static unsigned int
 execute_cleanup_cfg_post_optimizing (void)
 {
-  cleanup_tree_cfg ();
+  unsigned int todo = 0;
+  if (cleanup_tree_cfg ())
+    todo |= TODO_update_ssa;
   maybe_remove_unreachable_handlers ();
   cleanup_dead_labels ();
   group_case_labels ();
@@ -190,7 +192,7 @@ execute_cleanup_cfg_post_optimizing (voi
            }
        }
     }
-  return 0;
+  return todo;
 }

 struct gimple_opt_pass pass_cleanup_cfg_post_optimizing =


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

* [Bug middle-end/52045] [4.7 Regression] ICE: in execute_todo, at passes.c:1748 with -O3 -ftracer -fno-tree-ccp -fno-tree-copy-prop -fno-tree-dce and stpcpy_chk()
  2012-01-29 19:11 [Bug middle-end/52045] New: [4.7 Regression] ICE: in execute_todo, at passes.c:1748 with -O3 -ftracer -fno-tree-ccp -fno-tree-copy-prop -fno-tree-dce and stpcpy_chk() zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2012-01-30 13:35 ` rguenth at gcc dot gnu.org
@ 2012-01-30 13:48 ` rguenth at gcc dot gnu.org
  2012-01-30 13:49 ` rguenth at gcc dot gnu.org
  2012-01-30 13:50 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-01-30 13:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-30 13:39:19 UTC ---
Author: rguenth
Date: Mon Jan 30 13:39:12 2012
New Revision: 183721

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=183721
Log:
2012-01-30  Richard Guenther  <rguenther@suse.de>

    PR tree-optimization/52045
    * ipa-inline-transform.c (inline_transform): Call execute_fixup_cfg
    before computing final todo.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ipa-inline-transform.c


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

* [Bug middle-end/52045] [4.7 Regression] ICE: in execute_todo, at passes.c:1748 with -O3 -ftracer -fno-tree-ccp -fno-tree-copy-prop -fno-tree-dce and stpcpy_chk()
  2012-01-29 19:11 [Bug middle-end/52045] New: [4.7 Regression] ICE: in execute_todo, at passes.c:1748 with -O3 -ftracer -fno-tree-ccp -fno-tree-copy-prop -fno-tree-dce and stpcpy_chk() zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2012-01-30 13:48 ` rguenth at gcc dot gnu.org
@ 2012-01-30 13:49 ` rguenth at gcc dot gnu.org
  2012-01-30 13:50 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-01-30 13:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-30 13:40:32 UTC ---
Author: rguenth
Date: Mon Jan 30 13:40:24 2012
New Revision: 183722

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=183722
Log:
2012-01-30  Richard Guenther  <rguenther@suse.de>

    PR tree-optimization/52045
    * tree-optimize.c (execute_cleanup_cfg_post_optimizing): Update
    SSA form if cfgcleanup did anything.

    * gcc.dg/pr52045.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.dg/pr52045.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-optimize.c


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

* [Bug middle-end/52045] [4.7 Regression] ICE: in execute_todo, at passes.c:1748 with -O3 -ftracer -fno-tree-ccp -fno-tree-copy-prop -fno-tree-dce and stpcpy_chk()
  2012-01-29 19:11 [Bug middle-end/52045] New: [4.7 Regression] ICE: in execute_todo, at passes.c:1748 with -O3 -ftracer -fno-tree-ccp -fno-tree-copy-prop -fno-tree-dce and stpcpy_chk() zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2012-01-30 13:49 ` rguenth at gcc dot gnu.org
@ 2012-01-30 13:50 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-01-30 13:50 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-30 13:42:23 UTC ---
Fixed.


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

end of thread, other threads:[~2012-01-30 13:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-29 19:11 [Bug middle-end/52045] New: [4.7 Regression] ICE: in execute_todo, at passes.c:1748 with -O3 -ftracer -fno-tree-ccp -fno-tree-copy-prop -fno-tree-dce and stpcpy_chk() zsojka at seznam dot cz
2012-01-30  4:16 ` [Bug middle-end/52045] " jakub at gcc dot gnu.org
2012-01-30  9:35 ` rguenth at gcc dot gnu.org
2012-01-30 13:35 ` rguenth at gcc dot gnu.org
2012-01-30 13:48 ` rguenth at gcc dot gnu.org
2012-01-30 13:49 ` rguenth at gcc dot gnu.org
2012-01-30 13:50 ` 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).