public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/51014] New: [4.7 Regression] ICE: in apply_opt_in_copies, at loop-unroll.c:2283 with -O2 -g -funroll-loops
@ 2011-11-07 21:17 zsojka at seznam dot cz
  2011-11-08 10:37 ` [Bug rtl-optimization/51014] " 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-07 21:17 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51014
           Summary: [4.7 Regression] ICE: in apply_opt_in_copies, at
                    loop-unroll.c:2283 with -O2 -g -funroll-loops
    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 25743
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25743
reduced testcase

Compiler output:
$ gcc -O2 -g -funroll-loops testcase.C 
testcase.C: In function 'void foo(int)':
testcase.C:20:1: internal compiler error: in apply_opt_in_copies, at
loop-unroll.c:2283
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=0x1419378 "/mnt/svn/gcc-trunk/gcc/loop-unroll.c",
line=2283, function=0x1419c90 "apply_opt_in_copies")
    at /mnt/svn/gcc-trunk/gcc/diagnostic.c:898
#1  0x0000000000a19220 in apply_opt_in_copies (opt_info=0x1bcbf30, n_copies=7,
unrolling=true, rewrite_original_loop=true)
    at /mnt/svn/gcc-trunk/gcc/loop-unroll.c:2282
#2  0x0000000000a1b07d in unroll_loop_runtime_iterations (flags=-177191872) at
/mnt/svn/gcc-trunk/gcc/loop-unroll.c:1139
#3  unroll_and_peel_loops (flags=-177191872) at
/mnt/svn/gcc-trunk/gcc/loop-unroll.c:187
#4  0x0000000000a0aa97 in rtl_unroll_and_peel_loops () at
/mnt/svn/gcc-trunk/gcc/loop-init.c:329
#5  0x0000000000a5dfd8 in execute_one_pass (pass=0x196f640) at
/mnt/svn/gcc-trunk/gcc/passes.c:2064
#6  0x0000000000a5e345 in execute_pass_list (pass=0x196f640) at
/mnt/svn/gcc-trunk/gcc/passes.c:2119
#7  0x0000000000a5e357 in execute_pass_list (pass=0x196f820) at
/mnt/svn/gcc-trunk/gcc/passes.c:2120
#8  0x0000000000a5e357 in execute_pass_list (pass=0x196fc00) at
/mnt/svn/gcc-trunk/gcc/passes.c:2120
#9  0x0000000000bb334e in tree_rest_of_compilation (fndecl=0x7ffff56ebe00) at
/mnt/svn/gcc-trunk/gcc/tree-optimize.c:420
#10 0x0000000000816f8a in cgraph_expand_function (node=0x7ffff5587c60) at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:1819
#11 0x0000000000818f0c in cgraph_expand_all_functions () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:1886
#12 cgraph_optimize () at /mnt/svn/gcc-trunk/gcc/cgraphunit.c:2197
#13 0x000000000081940a in cgraph_finalize_compilation_unit () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:1327
#14 0x000000000064022b in cp_write_global_declarations () at
/mnt/svn/gcc-trunk/gcc/cp/decl2.c:4046
#15 0x0000000000b521f4 in compile_file (argc=16, argv=0x7fffffffdab8) at
/mnt/svn/gcc-trunk/gcc/toplev.c:581
#16 do_compile (argc=16, argv=0x7fffffffdab8) at
/mnt/svn/gcc-trunk/gcc/toplev.c:1930
#17 toplev_main (argc=16, argv=0x7fffffffdab8) at
/mnt/svn/gcc-trunk/gcc/toplev.c:2006
#18 0x00007ffff6178d2d in __libc_start_main () from /lib64/libc.so.6
#19 0x0000000000569a99 in _start ()

Tested revisions:
r181102 - crash
r181026 - crash
r180540 - OK


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

* [Bug rtl-optimization/51014] [4.7 Regression] ICE: in apply_opt_in_copies, at loop-unroll.c:2283 with -O2 -g -funroll-loops
  2011-11-07 21:17 [Bug tree-optimization/51014] New: [4.7 Regression] ICE: in apply_opt_in_copies, at loop-unroll.c:2283 with -O2 -g -funroll-loops zsojka at seznam dot cz
@ 2011-11-08 10:37 ` rguenth at gcc dot gnu.org
  2011-11-08 13:33 ` wouter.vermaelen at scarlet dot be
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-11-08 10:37 UTC (permalink / raw)
  To: gcc-bugs

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

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 rtl-optimization/51014] [4.7 Regression] ICE: in apply_opt_in_copies, at loop-unroll.c:2283 with -O2 -g -funroll-loops
  2011-11-07 21:17 [Bug tree-optimization/51014] New: [4.7 Regression] ICE: in apply_opt_in_copies, at loop-unroll.c:2283 with -O2 -g -funroll-loops zsojka at seznam dot cz
  2011-11-08 10:37 ` [Bug rtl-optimization/51014] " rguenth at gcc dot gnu.org
@ 2011-11-08 13:33 ` wouter.vermaelen at scarlet dot be
  2011-11-28 19:16 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: wouter.vermaelen at scarlet dot be @ 2011-11-08 13:33 UTC (permalink / raw)
  To: gcc-bugs

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

Wouter Vermaelen <wouter.vermaelen at scarlet dot be> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |wouter.vermaelen at scarlet
                   |                            |dot be

--- Comment #1 from Wouter Vermaelen <wouter.vermaelen at scarlet dot be> 2011-11-08 13:23:32 UTC ---
I hit the same ICE, with the same required compiler flags. Here's my reduced
testcase:

struct S {
    ~S() { delete p; }
    int* p;
};
void f(S* b, S* e) {
    for (/**/; b != e; ++b) {
        b->~S();
    }
}


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

* [Bug rtl-optimization/51014] [4.7 Regression] ICE: in apply_opt_in_copies, at loop-unroll.c:2283 with -O2 -g -funroll-loops
  2011-11-07 21:17 [Bug tree-optimization/51014] New: [4.7 Regression] ICE: in apply_opt_in_copies, at loop-unroll.c:2283 with -O2 -g -funroll-loops zsojka at seznam dot cz
  2011-11-08 10:37 ` [Bug rtl-optimization/51014] " rguenth at gcc dot gnu.org
  2011-11-08 13:33 ` wouter.vermaelen at scarlet dot be
@ 2011-11-28 19:16 ` jakub at gcc dot gnu.org
  2011-11-28 19:33 ` howarth at nitro dot med.uc.edu
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-11-28 19:16 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2011-11-28
                 CC|                            |jakub at gcc dot gnu.org
         AssignedTo|unassigned at gcc dot       |jakub at gcc dot gnu.org
                   |gnu.org                     |
     Ever Confirmed|0                           |1


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

* [Bug rtl-optimization/51014] [4.7 Regression] ICE: in apply_opt_in_copies, at loop-unroll.c:2283 with -O2 -g -funroll-loops
  2011-11-07 21:17 [Bug tree-optimization/51014] New: [4.7 Regression] ICE: in apply_opt_in_copies, at loop-unroll.c:2283 with -O2 -g -funroll-loops zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2011-11-28 19:16 ` jakub at gcc dot gnu.org
@ 2011-11-28 19:33 ` howarth at nitro dot med.uc.edu
  2011-11-28 19:46 ` howarth at nitro dot med.uc.edu
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2011-11-28 19:33 UTC (permalink / raw)
  To: gcc-bugs

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

Jack Howarth <howarth at nitro dot med.uc.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |howarth at nitro dot
                   |                            |med.uc.edu

--- Comment #2 from Jack Howarth <howarth at nitro dot med.uc.edu> 2011-11-28 19:14:33 UTC ---
PR51279 may be related as the solnScatPot.ii testcase also ICEs the compiler in
apply_opt_in_copies, at loop-unroll.c:2283 on x86_64-apple-darwin11.


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

* [Bug rtl-optimization/51014] [4.7 Regression] ICE: in apply_opt_in_copies, at loop-unroll.c:2283 with -O2 -g -funroll-loops
  2011-11-07 21:17 [Bug tree-optimization/51014] New: [4.7 Regression] ICE: in apply_opt_in_copies, at loop-unroll.c:2283 with -O2 -g -funroll-loops zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2011-11-28 19:33 ` howarth at nitro dot med.uc.edu
@ 2011-11-28 19:46 ` howarth at nitro dot med.uc.edu
  2011-11-28 21:03 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2011-11-28 19:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jack Howarth <howarth at nitro dot med.uc.edu> 2011-11-28 19:16:25 UTC ---
Note, like PR51279, the testcases both ICE the compiler at -O1 -g
-funroll-loops but not at -O0 -g -funroll-loops on x86_64-apple-darwin11.


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

* [Bug rtl-optimization/51014] [4.7 Regression] ICE: in apply_opt_in_copies, at loop-unroll.c:2283 with -O2 -g -funroll-loops
  2011-11-07 21:17 [Bug tree-optimization/51014] New: [4.7 Regression] ICE: in apply_opt_in_copies, at loop-unroll.c:2283 with -O2 -g -funroll-loops zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2011-11-28 19:46 ` howarth at nitro dot med.uc.edu
@ 2011-11-28 21:03 ` jakub at gcc dot gnu.org
  2011-12-01 15:32 ` howarth at nitro dot med.uc.edu
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-11-28 21:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-11-28 20:12:10 UTC ---
Created attachment 25939
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25939
gcc47-pr51014.patch

Untested fix.


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

* [Bug rtl-optimization/51014] [4.7 Regression] ICE: in apply_opt_in_copies, at loop-unroll.c:2283 with -O2 -g -funroll-loops
  2011-11-07 21:17 [Bug tree-optimization/51014] New: [4.7 Regression] ICE: in apply_opt_in_copies, at loop-unroll.c:2283 with -O2 -g -funroll-loops zsojka at seznam dot cz
                   ` (5 preceding siblings ...)
  2011-11-28 21:03 ` jakub at gcc dot gnu.org
@ 2011-12-01 15:32 ` howarth at nitro dot med.uc.edu
  2011-12-01 16:57 ` jakub at gcc dot gnu.org
  2011-12-01 17:05 ` jakub at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2011-12-01 15:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jack Howarth <howarth at nitro dot med.uc.edu> 2011-12-01 15:31:37 UTC ---
(In reply to comment #4)
> Created attachment 25939 [details]
> gcc47-pr51014.patch
> 
> Untested fix.

This fix solved the problem with the reduced testcase on x86_64-apple-darwin11
without regressions...

http://gcc.gnu.org/ml/gcc-testresults/2011-11/msg02982.html

Is there a problem on other targets preventing the commit?


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

* [Bug rtl-optimization/51014] [4.7 Regression] ICE: in apply_opt_in_copies, at loop-unroll.c:2283 with -O2 -g -funroll-loops
  2011-11-07 21:17 [Bug tree-optimization/51014] New: [4.7 Regression] ICE: in apply_opt_in_copies, at loop-unroll.c:2283 with -O2 -g -funroll-loops zsojka at seznam dot cz
                   ` (6 preceding siblings ...)
  2011-12-01 15:32 ` howarth at nitro dot med.uc.edu
@ 2011-12-01 16:57 ` jakub at gcc dot gnu.org
  2011-12-01 17:05 ` jakub at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-12-01 16:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-12-01 16:57:13 UTC ---
Author: jakub
Date: Thu Dec  1 16:57:07 2011
New Revision: 181883

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181883
Log:
    PR rtl-optimization/51014
    * loop-unroll.c (apply_opt_in_copies): Ignore label DEBUG_INSNs
    both from bb and orig_bb.

    * g++.dg/opt/pr51014.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/opt/pr51014.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/loop-unroll.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug rtl-optimization/51014] [4.7 Regression] ICE: in apply_opt_in_copies, at loop-unroll.c:2283 with -O2 -g -funroll-loops
  2011-11-07 21:17 [Bug tree-optimization/51014] New: [4.7 Regression] ICE: in apply_opt_in_copies, at loop-unroll.c:2283 with -O2 -g -funroll-loops zsojka at seznam dot cz
                   ` (7 preceding siblings ...)
  2011-12-01 16:57 ` jakub at gcc dot gnu.org
@ 2011-12-01 17:05 ` jakub at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-12-01 17:05 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-12-01 17:04:45 UTC ---
Fixed.


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

end of thread, other threads:[~2011-12-01 17:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-07 21:17 [Bug tree-optimization/51014] New: [4.7 Regression] ICE: in apply_opt_in_copies, at loop-unroll.c:2283 with -O2 -g -funroll-loops zsojka at seznam dot cz
2011-11-08 10:37 ` [Bug rtl-optimization/51014] " rguenth at gcc dot gnu.org
2011-11-08 13:33 ` wouter.vermaelen at scarlet dot be
2011-11-28 19:16 ` jakub at gcc dot gnu.org
2011-11-28 19:33 ` howarth at nitro dot med.uc.edu
2011-11-28 19:46 ` howarth at nitro dot med.uc.edu
2011-11-28 21:03 ` jakub at gcc dot gnu.org
2011-12-01 15:32 ` howarth at nitro dot med.uc.edu
2011-12-01 16:57 ` jakub at gcc dot gnu.org
2011-12-01 17:05 ` 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).