public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/24309]  New: [4.1 Regression] ICE with -O3 -ftree-loop-linear
@ 2005-10-11 14:10 drab at kepler dot fjfi dot cvut dot cz
  2005-10-11 14:11 ` [Bug tree-optimization/24309] " drab at kepler dot fjfi dot cvut dot cz
                   ` (25 more replies)
  0 siblings, 26 replies; 27+ messages in thread
From: drab at kepler dot fjfi dot cvut dot cz @ 2005-10-11 14:10 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2109 bytes --]

The example (attached below), when compiled by following gcc

-------------------
$ gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../../../gcc-CVS-20051011/gcc-CVS-20051011/configure
--host=i686-pc-linux-gnu --prefix=/usr/local/opt/gcc-4.1
--exec-prefix=/usr/local/opt/gcc-4.1 --sysconfdir=/etc
--libdir=/usr/local/opt/gcc-4.1/lib --libexecdir=/usr/local/opt/gcc-4.1/libexec
--sharedstatedir=/var --localstatedir=/var --program-suffix=-4.1
--with-x-includes=/usr/X11R6/include --with-x-libraries=/usr/X11R6/lib
--enable-shared --enable-static --with-gnu-as --with-gnu-ld --with-stabs
--enable-threads=posix --enable-version-specific-runtime-libs
--disable-coverage --disable-libgcj --disable-checking --enable-multilib
--with-x --enable-cmath --enable-libstdcxx-debug --enable-fast-character
--enable-hash-synchronization --with-system-zlib --with-libbanshee
--with-demangler-in-ld --with-arch=athlon-xp --disable-libada
--enable-languages=c,c++,f95,objc
Thread model: posix
gcc version 4.1.0 20051010 (experimental)
-------------------

with

-------------------
gcc -O3 -ftree-loop-linear -c quant_lsp.c -o quant_lsp.o
-------------------

results in this:

-------------------
quant_lsp.c: In function ‘lsp_quant_48k’:
quant_lsp.c:103: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
-------------------

This fails on both i686-pc-linux-gnu and x86_64-pc-linux-gnu. It seems that the
regression was introduced somewhere between CVS-20050723 (which works) and
CVS-20050812 (which doesn't).


-- 
           Summary: [4.1 Regression] ICE with -O3 -ftree-loop-linear
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: drab at kepler dot fjfi dot cvut dot cz
GCC target triplet: i?86-*-*, x86_64-*-*


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


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

* [Bug tree-optimization/24309] [4.1 Regression] ICE with -O3 -ftree-loop-linear
  2005-10-11 14:10 [Bug tree-optimization/24309] New: [4.1 Regression] ICE with -O3 -ftree-loop-linear drab at kepler dot fjfi dot cvut dot cz
@ 2005-10-11 14:11 ` drab at kepler dot fjfi dot cvut dot cz
  2005-10-11 14:12 ` pinskia at gcc dot gnu dot org
                   ` (24 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: drab at kepler dot fjfi dot cvut dot cz @ 2005-10-11 14:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from drab at kepler dot fjfi dot cvut dot cz  2005-10-11 14:11 -------
Created an attachment (id=9965)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9965&action=view)
Triggers the bug


-- 


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


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

* [Bug tree-optimization/24309] [4.1 Regression] ICE with -O3 -ftree-loop-linear
  2005-10-11 14:10 [Bug tree-optimization/24309] New: [4.1 Regression] ICE with -O3 -ftree-loop-linear drab at kepler dot fjfi dot cvut dot cz
  2005-10-11 14:11 ` [Bug tree-optimization/24309] " drab at kepler dot fjfi dot cvut dot cz
@ 2005-10-11 14:12 ` pinskia at gcc dot gnu dot org
  2005-10-11 14:48 ` pinskia at gcc dot gnu dot org
                   ` (23 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-11 14:12 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
   Target Milestone|---                         |4.1.0


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


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

* [Bug tree-optimization/24309] [4.1 Regression] ICE with -O3 -ftree-loop-linear
  2005-10-11 14:10 [Bug tree-optimization/24309] New: [4.1 Regression] ICE with -O3 -ftree-loop-linear drab at kepler dot fjfi dot cvut dot cz
  2005-10-11 14:11 ` [Bug tree-optimization/24309] " drab at kepler dot fjfi dot cvut dot cz
  2005-10-11 14:12 ` pinskia at gcc dot gnu dot org
@ 2005-10-11 14:48 ` pinskia at gcc dot gnu dot org
  2005-10-11 14:56 ` drab at kepler dot fjfi dot cvut dot cz
                   ` (22 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-11 14:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2005-10-11 14:48 -------
Confirmed, reduced testcase:
float weight[10];
void lsp_weight_quant(float *x, char *cdbk)
{
   int i,j;
   float dist;
   int best_id=0;
   for (i=0;i<16;i++)
   {
      for (j=0;j<10;j++)
         dist=dist+weight[j];
      if (dist<0)
         best_id=i;
   }
   x[j] = cdbk[best_id*10+j];
}

------
but this is just a latent bug as the above also ICEs in 4.0.0.
Related to PR 23820.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dberlin at gcc dot gnu dot
                   |                            |org
  BugsThisDependsOn|                            |23820
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-10-11 14:48:46
               date|                            |


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


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

* [Bug tree-optimization/24309] [4.1 Regression] ICE with -O3 -ftree-loop-linear
  2005-10-11 14:10 [Bug tree-optimization/24309] New: [4.1 Regression] ICE with -O3 -ftree-loop-linear drab at kepler dot fjfi dot cvut dot cz
                   ` (2 preceding siblings ...)
  2005-10-11 14:48 ` pinskia at gcc dot gnu dot org
@ 2005-10-11 14:56 ` drab at kepler dot fjfi dot cvut dot cz
  2005-10-11 14:58 ` pinskia at gcc dot gnu dot org
                   ` (21 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: drab at kepler dot fjfi dot cvut dot cz @ 2005-10-11 14:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from drab at kepler dot fjfi dot cvut dot cz  2005-10-11 14:56 -------
(In reply to comment #2)

> ------
> but this is just a latent bug as the above also ICEs in 4.0.0.
> Related to PR 23820.

No! Both the reduced and my original testcase work for me on 4.0.x.
At least on this one:

gcc version 4.0.2 20050827 (prerelease)


-- 


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


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

* [Bug tree-optimization/24309] [4.1 Regression] ICE with -O3 -ftree-loop-linear
  2005-10-11 14:10 [Bug tree-optimization/24309] New: [4.1 Regression] ICE with -O3 -ftree-loop-linear drab at kepler dot fjfi dot cvut dot cz
                   ` (3 preceding siblings ...)
  2005-10-11 14:56 ` drab at kepler dot fjfi dot cvut dot cz
@ 2005-10-11 14:58 ` pinskia at gcc dot gnu dot org
  2005-10-11 15:24 ` drab at kepler dot fjfi dot cvut dot cz
                   ` (20 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-11 14:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2005-10-11 14:58 -------
(In reply to comment #3)
> No! Both the reduced and my original testcase work for me on 4.0.x.
> At least on this one:

That is with checking disabled so ...


-- 


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


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

* [Bug tree-optimization/24309] [4.1 Regression] ICE with -O3 -ftree-loop-linear
  2005-10-11 14:10 [Bug tree-optimization/24309] New: [4.1 Regression] ICE with -O3 -ftree-loop-linear drab at kepler dot fjfi dot cvut dot cz
                   ` (4 preceding siblings ...)
  2005-10-11 14:58 ` pinskia at gcc dot gnu dot org
@ 2005-10-11 15:24 ` drab at kepler dot fjfi dot cvut dot cz
  2005-10-11 15:27 ` dberlin at dberlin dot org
                   ` (19 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: drab at kepler dot fjfi dot cvut dot cz @ 2005-10-11 15:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from drab at kepler dot fjfi dot cvut dot cz  2005-10-11 15:24 -------
(In reply to comment #4)

> That is with checking disabled so ...

Yes. That's right.


-- 


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


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

* [Bug tree-optimization/24309] [4.1 Regression] ICE with -O3 -ftree-loop-linear
  2005-10-11 14:10 [Bug tree-optimization/24309] New: [4.1 Regression] ICE with -O3 -ftree-loop-linear drab at kepler dot fjfi dot cvut dot cz
                   ` (5 preceding siblings ...)
  2005-10-11 15:24 ` drab at kepler dot fjfi dot cvut dot cz
@ 2005-10-11 15:27 ` dberlin at dberlin dot org
  2005-10-31  6:12 ` mmitchel at gcc dot gnu dot org
                   ` (18 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: dberlin at dberlin dot org @ 2005-10-11 15:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from dberlin at gcc dot gnu dot org  2005-10-11 15:27 -------
Subject: Re:  [4.1 Regression] ICE with -O3
        -ftree-loop-linear

On Tue, 2005-10-11 at 15:24 +0000, drab at kepler dot fjfi dot cvut dot
cz wrote:
> 
> ------- Comment #5 from drab at kepler dot fjfi dot cvut dot cz  2005-10-11 15:24 -------
> (In reply to comment #4)
> 
> > That is with checking disabled so ...

> Yes. That's right.

With checking disabled, it won't ICE

> 
> 


-- 


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


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

* [Bug tree-optimization/24309] [4.1 Regression] ICE with -O3 -ftree-loop-linear
  2005-10-11 14:10 [Bug tree-optimization/24309] New: [4.1 Regression] ICE with -O3 -ftree-loop-linear drab at kepler dot fjfi dot cvut dot cz
                   ` (6 preceding siblings ...)
  2005-10-11 15:27 ` dberlin at dberlin dot org
@ 2005-10-31  6:12 ` mmitchel at gcc dot gnu dot org
  2005-11-02  1:08 ` jean-marc dot valin at usherbrooke dot ca
                   ` (17 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-10-31  6:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from mmitchel at gcc dot gnu dot org  2005-10-31 06:12 -------
Leaving as P2.


-- 


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


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

* [Bug tree-optimization/24309] [4.1 Regression] ICE with -O3 -ftree-loop-linear
  2005-10-11 14:10 [Bug tree-optimization/24309] New: [4.1 Regression] ICE with -O3 -ftree-loop-linear drab at kepler dot fjfi dot cvut dot cz
                   ` (7 preceding siblings ...)
  2005-10-31  6:12 ` mmitchel at gcc dot gnu dot org
@ 2005-11-02  1:08 ` jean-marc dot valin at usherbrooke dot ca
  2005-11-14 17:39 ` janis at gcc dot gnu dot org
                   ` (16 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: jean-marc dot valin at usherbrooke dot ca @ 2005-11-02  1:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from jean-marc dot valin at usherbrooke dot ca  2005-11-02 01:07 -------
OK, I'm not sure whether it's the same bug but when compiling the following
code with 
% gcc-4.1-20051029 -O2 -ftree-loop-linear -c vq.c

int vq_index(float *in, const float *codebook, int len, int entries)
{
   int i,j;
   float min_dist=0;
   int best_index=0;
   for (i=0;i<entries;i++)
   {
      float dist=0;
      for (j=0;j<len;j++)
      {
         float tmp = in[j]-*codebook++;
         dist += tmp*tmp;
      }
      if (i==0 || dist<min_dist)
      {
         min_dist=dist;
         best_index=i;
      }
   }
   return best_index;
}

The main difference is that the above example with quant_lsp.c only gets
triggered at -O3, whereas vq.c triggers the bug at -O2. Both files are part of
the same software (Speex) BTW.


-- 


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


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

* [Bug tree-optimization/24309] [4.1 Regression] ICE with -O3 -ftree-loop-linear
  2005-10-11 14:10 [Bug tree-optimization/24309] New: [4.1 Regression] ICE with -O3 -ftree-loop-linear drab at kepler dot fjfi dot cvut dot cz
                   ` (8 preceding siblings ...)
  2005-11-02  1:08 ` jean-marc dot valin at usherbrooke dot ca
@ 2005-11-14 17:39 ` janis at gcc dot gnu dot org
  2005-11-14 18:18 ` dberlin at gcc dot gnu dot org
                   ` (15 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: janis at gcc dot gnu dot org @ 2005-11-14 17:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from janis at gcc dot gnu dot org  2005-11-14 17:39 -------
A regression hunt on powerpc-linux shows that the testcase from comment #8
starts failing with this large merge from the autovect branch, within the
date range that the submitter identified:

http://gcc.gnu.org/viewcvs?view=rev&rev=102356

r102356 | irar | 2005-07-25 12:05:07 +0000 (Mon, 25 Jul 2005) | 83 lines

A regression hunt on powerpc-linux using the testcase from comment #2
identified this patch; the original larger testcase fails at the same place:

http://gcc.gnu.org/viewcvs?view=rev&rev=88404

r88404 | rakdver | 2004-10-01 18:26:37 +0000 (Fri, 01 Oct 2004) | 9 lines

        * common.opt (ftree-loop-ivcanon): Enable by default.
        * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely):
        Enable complete loop unrolling.
        (canonicalize_induction_variables, tree_unroll_loops_completely):
        Reset scev info.

        * gcc.dg/tree-ssa/loop-1.c: Check that unrolling occurs already on
        tree level.

The reghunts used "-O2 -ftree-loop-linear".  Let me know if there are other
options that could be used to find earlier failures.


-- 


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


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

* [Bug tree-optimization/24309] [4.1 Regression] ICE with -O3 -ftree-loop-linear
  2005-10-11 14:10 [Bug tree-optimization/24309] New: [4.1 Regression] ICE with -O3 -ftree-loop-linear drab at kepler dot fjfi dot cvut dot cz
                   ` (9 preceding siblings ...)
  2005-11-14 17:39 ` janis at gcc dot gnu dot org
@ 2005-11-14 18:18 ` dberlin at gcc dot gnu dot org
  2006-02-24  0:26 ` [Bug tree-optimization/24309] [4.1/4.2 " mmitchel at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: dberlin at gcc dot gnu dot org @ 2005-11-14 18:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from dberlin at gcc dot gnu dot org  2005-11-14 18:18 -------
It probably did *nothing at all* before the merge.  The ICE is not too hard to
fix, i just haven't gotten to it yet
I will hopefully soon.


-- 


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


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

* [Bug tree-optimization/24309] [4.1/4.2 Regression] ICE with -O3 -ftree-loop-linear
  2005-10-11 14:10 [Bug tree-optimization/24309] New: [4.1 Regression] ICE with -O3 -ftree-loop-linear drab at kepler dot fjfi dot cvut dot cz
                   ` (10 preceding siblings ...)
  2005-11-14 18:18 ` dberlin at gcc dot gnu dot org
@ 2006-02-24  0:26 ` mmitchel at gcc dot gnu dot org
  2006-05-18  5:51 ` pinskia at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-02-24  0:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from mmitchel at gcc dot gnu dot org  2006-02-24 00:26 -------
This issue will not be resolved in GCC 4.1.0; retargeted at GCC 4.1.1.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.1.0                       |4.1.1


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


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

* [Bug tree-optimization/24309] [4.1/4.2 Regression] ICE with -O3 -ftree-loop-linear
  2005-10-11 14:10 [Bug tree-optimization/24309] New: [4.1 Regression] ICE with -O3 -ftree-loop-linear drab at kepler dot fjfi dot cvut dot cz
                   ` (11 preceding siblings ...)
  2006-02-24  0:26 ` [Bug tree-optimization/24309] [4.1/4.2 " mmitchel at gcc dot gnu dot org
@ 2006-05-18  5:51 ` pinskia at gcc dot gnu dot org
  2006-05-25  2:35 ` mmitchel at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-18  5:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from pinskia at gcc dot gnu dot org  2006-05-18 05:51 -------
This still fails after Pop's patch.


-- 


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


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

* [Bug tree-optimization/24309] [4.1/4.2 Regression] ICE with -O3 -ftree-loop-linear
  2005-10-11 14:10 [Bug tree-optimization/24309] New: [4.1 Regression] ICE with -O3 -ftree-loop-linear drab at kepler dot fjfi dot cvut dot cz
                   ` (12 preceding siblings ...)
  2006-05-18  5:51 ` pinskia at gcc dot gnu dot org
@ 2006-05-25  2:35 ` mmitchel at gcc dot gnu dot org
  2007-01-23 23:19 ` [Bug tree-optimization/24309] [4.1/4.2/4.3 " drab at kepler dot fjfi dot cvut dot cz
                   ` (11 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-05-25  2:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from mmitchel at gcc dot gnu dot org  2006-05-25 02:33 -------
Will not be fixed in 4.1.1; adjust target milestone to 4.1.2.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.1.1                       |4.1.2


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


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

* [Bug tree-optimization/24309] [4.1/4.2/4.3 Regression] ICE with -O3 -ftree-loop-linear
  2005-10-11 14:10 [Bug tree-optimization/24309] New: [4.1 Regression] ICE with -O3 -ftree-loop-linear drab at kepler dot fjfi dot cvut dot cz
                   ` (13 preceding siblings ...)
  2006-05-25  2:35 ` mmitchel at gcc dot gnu dot org
@ 2007-01-23 23:19 ` drab at kepler dot fjfi dot cvut dot cz
  2007-02-14  9:07 ` mmitchel at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: drab at kepler dot fjfi dot cvut dot cz @ 2007-01-23 23:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from drab at kepler dot fjfi dot cvut dot cz  2007-01-23 23:19 -------
I've tested my original testcase for this bug and it seems to work for me on
i686 and gcc version 4.3.0 20070121 (experimental). So, it seems to be fixed.
Can anyone confirm, please?


-- 


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


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

* [Bug tree-optimization/24309] [4.1/4.2/4.3 Regression] ICE with -O3 -ftree-loop-linear
  2005-10-11 14:10 [Bug tree-optimization/24309] New: [4.1 Regression] ICE with -O3 -ftree-loop-linear drab at kepler dot fjfi dot cvut dot cz
                   ` (14 preceding siblings ...)
  2007-01-23 23:19 ` [Bug tree-optimization/24309] [4.1/4.2/4.3 " drab at kepler dot fjfi dot cvut dot cz
@ 2007-02-14  9:07 ` mmitchel at gcc dot gnu dot org
  2007-03-05  9:30 ` irar at il dot ibm dot com
                   ` (9 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-02-14  9:07 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.1.2                       |4.1.3


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


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

* [Bug tree-optimization/24309] [4.1/4.2/4.3 Regression] ICE with -O3 -ftree-loop-linear
  2005-10-11 14:10 [Bug tree-optimization/24309] New: [4.1 Regression] ICE with -O3 -ftree-loop-linear drab at kepler dot fjfi dot cvut dot cz
                   ` (15 preceding siblings ...)
  2007-02-14  9:07 ` mmitchel at gcc dot gnu dot org
@ 2007-03-05  9:30 ` irar at il dot ibm dot com
  2007-09-18 13:16 ` rguenth at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: irar at il dot ibm dot com @ 2007-03-05  9:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from irar at il dot ibm dot com  2007-03-05 09:30 -------
I tried the reduced testcase on powerpc with -ftree-loop-linear and both -O2
and -O3 on 4.1, 4.2 and 4.3, and it works fine.

Ira


-- 

irar at il dot ibm dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |irar at il dot ibm dot com


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


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

* [Bug tree-optimization/24309] [4.1/4.2/4.3 Regression] ICE with -O3 -ftree-loop-linear
  2005-10-11 14:10 [Bug tree-optimization/24309] New: [4.1 Regression] ICE with -O3 -ftree-loop-linear drab at kepler dot fjfi dot cvut dot cz
                   ` (16 preceding siblings ...)
  2007-03-05  9:30 ` irar at il dot ibm dot com
@ 2007-09-18 13:16 ` rguenth at gcc dot gnu dot org
  2007-09-18 13:17 ` rguenth at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-09-18 13:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from rguenth at gcc dot gnu dot org  2007-09-18 13:16 -------
I can still see the ICE with -O2 -ftree-loop-linear and the testcase from
comment
2 on trunk (x86_64):

t.i: In function 'lsp_weight_quant':
t.i:3: internal compiler error: in lambda_loopnest_to_gcc_loopnest, at
lambda-code.c:1839

          gcc_assert (TREE_CODE (stmt) != PHI_NODE);

but

(gdb) call debug_generic_expr (stmt)
best_id_6 = PHI <best_id_49(6), i_46(5)>


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2007-08-06 14:56:17         |2007-09-18 13:16:26
               date|                            |


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


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

* [Bug tree-optimization/24309] [4.1/4.2/4.3 Regression] ICE with -O3 -ftree-loop-linear
  2005-10-11 14:10 [Bug tree-optimization/24309] New: [4.1 Regression] ICE with -O3 -ftree-loop-linear drab at kepler dot fjfi dot cvut dot cz
                   ` (17 preceding siblings ...)
  2007-09-18 13:16 ` rguenth at gcc dot gnu dot org
@ 2007-09-18 13:17 ` rguenth at gcc dot gnu dot org
  2007-10-10 22:29 ` pthaugen at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-09-18 13:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #17 from rguenth at gcc dot gnu dot org  2007-09-18 13:17 -------
Sebastian, can you have a look at this?


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |spop at gcc dot gnu dot org


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


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

* [Bug tree-optimization/24309] [4.1/4.2/4.3 Regression] ICE with -O3 -ftree-loop-linear
  2005-10-11 14:10 [Bug tree-optimization/24309] New: [4.1 Regression] ICE with -O3 -ftree-loop-linear drab at kepler dot fjfi dot cvut dot cz
                   ` (18 preceding siblings ...)
  2007-09-18 13:17 ` rguenth at gcc dot gnu dot org
@ 2007-10-10 22:29 ` pthaugen at gcc dot gnu dot org
  2007-10-11  5:58 ` ubizjak at gmail dot com
                   ` (5 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: pthaugen at gcc dot gnu dot org @ 2007-10-10 22:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #18 from pthaugen at gcc dot gnu dot org  2007-10-10 22:28 -------
I'm appear to be seeing the same thing trying to build 445.gobmk from cpu2006
on PowerPC.

run/build_base_gcc_64.0000> cat junk.c

int  board_size;

void print_eye(int eye[400])
{
  int m, n;
  int mini, maxi;
  int minj, maxj;

  mini = 1;
  minj = 1;
  for (m = 0; m < board_size; m++)
    for (n = 0; n < board_size; n++) {
      if (eye[m  + n] != 5) continue;

      if (m < mini) mini = m;
      if (n < minj) minj = n;
    }

  board_size = mini + minj;
}
run/build_base_gcc_64.0000> /home/pthaugen/install/gcc/trunk/bin/gcc -c -m64
-O2 -ftree-loop-linear junk.c
junk.c: In function 'print_eye':
junk.c:5: internal compiler error: in lambda_loopnest_to_gcc_loopnest, at
lambda-code.c:1840
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


-- 

pthaugen at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pthaugen at gcc dot gnu dot
                   |                            |org, bergner at gcc dot gnu
                   |                            |dot org


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


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

* [Bug tree-optimization/24309] [4.1/4.2/4.3 Regression] ICE with -O3 -ftree-loop-linear
  2005-10-11 14:10 [Bug tree-optimization/24309] New: [4.1 Regression] ICE with -O3 -ftree-loop-linear drab at kepler dot fjfi dot cvut dot cz
                   ` (19 preceding siblings ...)
  2007-10-10 22:29 ` pthaugen at gcc dot gnu dot org
@ 2007-10-11  5:58 ` ubizjak at gmail dot com
  2007-10-11  6:08 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: ubizjak at gmail dot com @ 2007-10-11  5:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #19 from ubizjak at gmail dot com  2007-10-11 05:58 -------
(In reply to comment #18)
> I'm appear to be seeing the same thing trying to build 445.gobmk from cpu2006
> on PowerPC.

Also fails on x86_64-pc-linux-gnu, Revision: 129224. Compiles OK for
i686-pc-linux-gnu target.


-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 GCC target triplet|                            |x86_64-*-*, ppc64-*-*


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


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

* [Bug tree-optimization/24309] [4.1/4.2/4.3 Regression] ICE with -O3 -ftree-loop-linear
  2005-10-11 14:10 [Bug tree-optimization/24309] New: [4.1 Regression] ICE with -O3 -ftree-loop-linear drab at kepler dot fjfi dot cvut dot cz
                   ` (20 preceding siblings ...)
  2007-10-11  5:58 ` ubizjak at gmail dot com
@ 2007-10-11  6:08 ` pinskia at gcc dot gnu dot org
  2007-10-11  6:13 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-10-11  6:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #20 from pinskia at gcc dot gnu dot org  2007-10-11 06:08 -------
(gdb) p debug_generic_expr (stmt)
minj_7 = PHI <minj_43(5), minj_43(7), n_40(6)>


-- 


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


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

* [Bug tree-optimization/24309] [4.1/4.2/4.3 Regression] ICE with -O3 -ftree-loop-linear
  2005-10-11 14:10 [Bug tree-optimization/24309] New: [4.1 Regression] ICE with -O3 -ftree-loop-linear drab at kepler dot fjfi dot cvut dot cz
                   ` (21 preceding siblings ...)
  2007-10-11  6:08 ` pinskia at gcc dot gnu dot org
@ 2007-10-11  6:13 ` pinskia at gcc dot gnu dot org
  2007-10-11 19:35 ` spop at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-10-11  6:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #21 from pinskia at gcc dot gnu dot org  2007-10-11 06:13 -------
Hmm, in 32bits it does this:
Won't transform loop. Optimal transform is the identity transform

While in 64bits, it tries to transform it.  It really does not matter which
order for the testcase in comment #18


-- 


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


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

* [Bug tree-optimization/24309] [4.1/4.2/4.3 Regression] ICE with -O3 -ftree-loop-linear
  2005-10-11 14:10 [Bug tree-optimization/24309] New: [4.1 Regression] ICE with -O3 -ftree-loop-linear drab at kepler dot fjfi dot cvut dot cz
                   ` (22 preceding siblings ...)
  2007-10-11  6:13 ` pinskia at gcc dot gnu dot org
@ 2007-10-11 19:35 ` spop at gcc dot gnu dot org
  2007-10-19 19:03 ` spop at gcc dot gnu dot org
  2007-10-19 19:03 ` spop at gcc dot gnu dot org
  25 siblings, 0 replies; 27+ messages in thread
From: spop at gcc dot gnu dot org @ 2007-10-11 19:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #22 from spop at gcc dot gnu dot org  2007-10-11 19:35 -------
Subject: Re:  [4.1/4.2/4.3 Regression] ICE with -O3 -ftree-loop-linear

There are several bugs that fail in the exact same place, because
we're not able to generate code for some induction variable containing
a phi node in their evolution.  I'm trying to fix all these bugs by
implementing an analysis phase that will filter out all the difficult
loops for which we know we won't be able to generate code for.


-- 


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


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

* [Bug tree-optimization/24309] [4.1/4.2/4.3 Regression] ICE with -O3 -ftree-loop-linear
  2005-10-11 14:10 [Bug tree-optimization/24309] New: [4.1 Regression] ICE with -O3 -ftree-loop-linear drab at kepler dot fjfi dot cvut dot cz
                   ` (24 preceding siblings ...)
  2007-10-19 19:03 ` spop at gcc dot gnu dot org
@ 2007-10-19 19:03 ` spop at gcc dot gnu dot org
  25 siblings, 0 replies; 27+ messages in thread
From: spop at gcc dot gnu dot org @ 2007-10-19 19:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #24 from spop at gcc dot gnu dot org  2007-10-19 19:03 -------
Fixed.


-- 

spop at gcc dot gnu dot org changed:

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


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


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

* [Bug tree-optimization/24309] [4.1/4.2/4.3 Regression] ICE with -O3 -ftree-loop-linear
  2005-10-11 14:10 [Bug tree-optimization/24309] New: [4.1 Regression] ICE with -O3 -ftree-loop-linear drab at kepler dot fjfi dot cvut dot cz
                   ` (23 preceding siblings ...)
  2007-10-11 19:35 ` spop at gcc dot gnu dot org
@ 2007-10-19 19:03 ` spop at gcc dot gnu dot org
  2007-10-19 19:03 ` spop at gcc dot gnu dot org
  25 siblings, 0 replies; 27+ messages in thread
From: spop at gcc dot gnu dot org @ 2007-10-19 19:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #23 from spop at gcc dot gnu dot org  2007-10-19 19:02 -------
Subject: Bug 24309

Author: spop
Date: Fri Oct 19 19:01:58 2007
New Revision: 129494

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129494
Log:
2007-10-19  Sebastian Pop  <sebastian.pop@amd.com>

        PR tree-optimization/23820
        PR tree-optimization/24309
        PR tree-optimization/33766
        * testsuite/gcc.dg/tree-ssa/pr23820.c: New.
        * testsuite/gcc.dg/tree-ssa/pr24309.c: New.
        * testsuite/gcc.dg/tree-ssa/pr33766.c: New.
        * testsuite/gcc.dg/tree-ssa/ltrans-3.c: XFAILed.
        * tree-loop-linear.c (perfect_loop_nest_depth): New.
        (linear_transform_loops): Use perfect_loop_nest_depth.
        * lambda-code.c (perfect_nest_p): Outer loops in perfect nests 
        should have a single condition: their exit.


Added:
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr23820.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr24309.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr33766.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/lambda-code.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/ltrans-3.c
    trunk/gcc/tree-loop-linear.c


-- 


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


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

end of thread, other threads:[~2007-10-19 19:03 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-11 14:10 [Bug tree-optimization/24309] New: [4.1 Regression] ICE with -O3 -ftree-loop-linear drab at kepler dot fjfi dot cvut dot cz
2005-10-11 14:11 ` [Bug tree-optimization/24309] " drab at kepler dot fjfi dot cvut dot cz
2005-10-11 14:12 ` pinskia at gcc dot gnu dot org
2005-10-11 14:48 ` pinskia at gcc dot gnu dot org
2005-10-11 14:56 ` drab at kepler dot fjfi dot cvut dot cz
2005-10-11 14:58 ` pinskia at gcc dot gnu dot org
2005-10-11 15:24 ` drab at kepler dot fjfi dot cvut dot cz
2005-10-11 15:27 ` dberlin at dberlin dot org
2005-10-31  6:12 ` mmitchel at gcc dot gnu dot org
2005-11-02  1:08 ` jean-marc dot valin at usherbrooke dot ca
2005-11-14 17:39 ` janis at gcc dot gnu dot org
2005-11-14 18:18 ` dberlin at gcc dot gnu dot org
2006-02-24  0:26 ` [Bug tree-optimization/24309] [4.1/4.2 " mmitchel at gcc dot gnu dot org
2006-05-18  5:51 ` pinskia at gcc dot gnu dot org
2006-05-25  2:35 ` mmitchel at gcc dot gnu dot org
2007-01-23 23:19 ` [Bug tree-optimization/24309] [4.1/4.2/4.3 " drab at kepler dot fjfi dot cvut dot cz
2007-02-14  9:07 ` mmitchel at gcc dot gnu dot org
2007-03-05  9:30 ` irar at il dot ibm dot com
2007-09-18 13:16 ` rguenth at gcc dot gnu dot org
2007-09-18 13:17 ` rguenth at gcc dot gnu dot org
2007-10-10 22:29 ` pthaugen at gcc dot gnu dot org
2007-10-11  5:58 ` ubizjak at gmail dot com
2007-10-11  6:08 ` pinskia at gcc dot gnu dot org
2007-10-11  6:13 ` pinskia at gcc dot gnu dot org
2007-10-11 19:35 ` spop at gcc dot gnu dot org
2007-10-19 19:03 ` spop at gcc dot gnu dot org
2007-10-19 19:03 ` spop at gcc dot gnu dot 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).