public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/46248] New: 4.6 regression: crash+infinite recursion in combine
@ 2010-10-31 10:26 astrange at ithinksw dot com
  2010-10-31 15:16 ` [Bug rtl-optimization/46248] " hjl.tools at gmail dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: astrange at ithinksw dot com @ 2010-10-31 10:26 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: 4.6 regression: crash+infinite recursion in combine
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: astrange@ithinksw.com


Created attachment 22210
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22210
source

gcc r166084 crashes compiling ffmpeg libpostproc on x86-64-apple-darwin10.

Minimized-ish source attached.

> gcc -v
Using built-in specs.
COLLECT_GCC=/usr/local/gcc46/bin/gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc46/libexec/gcc/x86_64-apple-darwin10.4.0/4.6.0/lto-wrapper
Target: x86_64-apple-darwin10.4.0
Configured with: ../../src/gcc/configure --prefix=/usr/local/gcc46
--with-arch=native --with-tune=native --disable-nls --with-gmp=/sw
--disable-bootstrap --enable-languages=c,c++,lto,objc,obj-c++
Thread model: posix
gcc version 4.6.0 20101030 (experimental) (GCC) 

> gcc -O3 -S postprocess.i 
gcc: internal compiler error: Segmentation fault (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Backtrace:

#0  0x000000010031fc34 in if_then_else_cond (x=0x1425e14b0,
ptrue=0x7fff5f400078, pfalse=0x7fff5f400068) at
../../../src/gcc/gcc/combine.c:8471
#1  0x000000010031fd82 in if_then_else_cond (x=0x1425e1498,
ptrue=0x7fff5f400118, pfalse=0x7fff5f400108) at
../../../src/gcc/gcc/combine.c:8507
#2  0x000000010031fd82 in if_then_else_cond (x=0x1425e14b0,
ptrue=0x7fff5f4001b8, pfalse=0x7fff5f4001a8) at
../../../src/gcc/gcc/combine.c:8507
#3  0x000000010031fd82 in if_then_else_cond (x=0x1425e1498,
ptrue=0x7fff5f400258, pfalse=0x7fff5f400248) at
../../../src/gcc/gcc/combine.c:8507
#4  0x000000010031fd82 in if_then_else_cond (x=0x1425e14b0,
ptrue=0x7fff5f4002f8, pfalse=0x7fff5f4002e8) at
../../../src/gcc/gcc/combine.c:8507
#5  0x000000010031fd82 in if_then_else_cond (x=0x1425e1498,
ptrue=0x7fff5f400398, pfalse=0x7fff5f400388) at
../../../src/gcc/gcc/combine.c:8507
#6  0x000000010031fd82 in if_then_else_cond (x=0x1425e14b0,
ptrue=0x7fff5f400438, pfalse=0x7fff5f400428) at
../../../src/gcc/gcc/combine.c:8507
...


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

* [Bug rtl-optimization/46248] 4.6 regression: crash+infinite recursion in combine
  2010-10-31 10:26 [Bug rtl-optimization/46248] New: 4.6 regression: crash+infinite recursion in combine astrange at ithinksw dot com
@ 2010-10-31 15:16 ` hjl.tools at gmail dot com
  2010-10-31 15:27 ` [Bug rtl-optimization/46248] [4.6 regression] " pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: hjl.tools at gmail dot com @ 2010-10-31 15:16 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2010.10.31 15:15:00
                 CC|                            |bernds at codesourcery dot
                   |                            |com, hjl.tools at gmail dot
                   |                            |com
     Ever Confirmed|0                           |1

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2010-10-31 15:15:00 UTC ---
It is caused by revision 165674:

http://gcc.gnu.org/ml/gcc-cvs/2010-10/msg00859.html


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

* [Bug rtl-optimization/46248] [4.6 regression] crash+infinite recursion in combine
  2010-10-31 10:26 [Bug rtl-optimization/46248] New: 4.6 regression: crash+infinite recursion in combine astrange at ithinksw dot com
  2010-10-31 15:16 ` [Bug rtl-optimization/46248] " hjl.tools at gmail dot com
@ 2010-10-31 15:27 ` pinskia at gcc dot gnu.org
  2010-11-01 10:35 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2010-10-31 15:27 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
   Target Milestone|---                         |4.6.0
            Summary|4.6 regression:             |[4.6 regression]
                   |crash+infinite recursion in |crash+infinite recursion in
                   |combine                     |combine

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2010-10-31 15:27:29 UTC ---
Related to PR 46212.


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

* [Bug rtl-optimization/46248] [4.6 regression] crash+infinite recursion in combine
  2010-10-31 10:26 [Bug rtl-optimization/46248] New: 4.6 regression: crash+infinite recursion in combine astrange at ithinksw dot com
  2010-10-31 15:16 ` [Bug rtl-optimization/46248] " hjl.tools at gmail dot com
  2010-10-31 15:27 ` [Bug rtl-optimization/46248] [4.6 regression] " pinskia at gcc dot gnu.org
@ 2010-11-01 10:35 ` jakub at gcc dot gnu.org
  2010-11-01 11:24 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-11-01 10:35 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot
                   |                            |gnu.org, jakub at gcc dot
                   |                            |gnu.org

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-11-01 10:34:53 UTC ---
      if (added_sets_1)
        {
          rtx t = i1pat;
          if (i0_feeds_i1_n)
            t = subst (t, i0dest, i0src, 0, 0);

          XVECEXP (newpat, 0, --total_sets) = t;
        }
      if (added_sets_2)
        {
          rtx t = i2pat;
          if (i0_feeds_i2_n)
            t = subst (t, i0dest, i0src, 0, 0);
          if (i1_feeds_i2_n)
            t = subst (t, i1dest, i1src, 0, 0);
          if (i0_feeds_i1_n && i1_feeds_i2_n)   <==============
            t = subst (t, i0dest, i0src, 0, 0); <==============

          XVECEXP (newpat, 0, --total_sets) = t;
        }

The two lines above are problematic, because subst may clobber the first
argument's expression and
      newpat = subst (newpat, i0dest, i0src, 0,
                      i0_feeds_i1_n && i0dest_in_i0src); 
actually clobbered not just newpat, but also i1src which was in it.  Not sure
if we actually can rely it always happened say if substed_i0 is true and not do
the i0dest -> i0src replacement in i2pat here.


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

* [Bug rtl-optimization/46248] [4.6 regression] crash+infinite recursion in combine
  2010-10-31 10:26 [Bug rtl-optimization/46248] New: 4.6 regression: crash+infinite recursion in combine astrange at ithinksw dot com
                   ` (2 preceding siblings ...)
  2010-11-01 10:35 ` jakub at gcc dot gnu.org
@ 2010-11-01 11:24 ` jakub at gcc dot gnu.org
  2010-11-03  8:30 ` jakub at gcc dot gnu.org
  2010-11-03  8:39 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-11-01 11:24 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot       |jakub at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-11-01 11:23:33 UTC ---
Created attachment 22216
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22216
gcc46-pr46034.patch

Untested patch.


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

* [Bug rtl-optimization/46248] [4.6 regression] crash+infinite recursion in combine
  2010-10-31 10:26 [Bug rtl-optimization/46248] New: 4.6 regression: crash+infinite recursion in combine astrange at ithinksw dot com
                   ` (3 preceding siblings ...)
  2010-11-01 11:24 ` jakub at gcc dot gnu.org
@ 2010-11-03  8:30 ` jakub at gcc dot gnu.org
  2010-11-03  8:39 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-11-03  8:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-11-03 08:30:29 UTC ---
Author: jakub
Date: Wed Nov  3 08:30:21 2010
New Revision: 166231

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166231
Log:
    PR rtl-optimization/46034
    PR rtl-optimization/46212
    PR rtl-optimization/46248
    * combine.c (try_combine): If added_sets_2 where i0dest_in_i0src
    and i0 feeds i1 and i1 feeds i2 or i0 feeds i2, make a copy of i1src
    before i0dest -> i0src substitution and pass 1 instead of 0 as last
    argument to subst on i2pat.

    * gcc.c-torture/compile/pr46034.c: New test.
    * gcc.c-torture/compile/pr46248.c: New test.
    * gcc.dg/pr46212.c: New test.

Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/pr46034.c
    trunk/gcc/testsuite/gcc.c-torture/compile/pr46248.c
    trunk/gcc/testsuite/gcc.dg/pr46212.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/combine.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug rtl-optimization/46248] [4.6 regression] crash+infinite recursion in combine
  2010-10-31 10:26 [Bug rtl-optimization/46248] New: 4.6 regression: crash+infinite recursion in combine astrange at ithinksw dot com
                   ` (4 preceding siblings ...)
  2010-11-03  8:30 ` jakub at gcc dot gnu.org
@ 2010-11-03  8:39 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-11-03  8:39 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-11-03 08:38:55 UTC ---
Fixed.


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

end of thread, other threads:[~2010-11-03  8:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-31 10:26 [Bug rtl-optimization/46248] New: 4.6 regression: crash+infinite recursion in combine astrange at ithinksw dot com
2010-10-31 15:16 ` [Bug rtl-optimization/46248] " hjl.tools at gmail dot com
2010-10-31 15:27 ` [Bug rtl-optimization/46248] [4.6 regression] " pinskia at gcc dot gnu.org
2010-11-01 10:35 ` jakub at gcc dot gnu.org
2010-11-01 11:24 ` jakub at gcc dot gnu.org
2010-11-03  8:30 ` jakub at gcc dot gnu.org
2010-11-03  8:39 ` 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).