public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/14470] New: x86 optimizer error (?)
@ 2004-03-07 22:13 lvoge at cs dot vu dot nl
  2004-03-07 22:26 ` [Bug c/14470] " lvoge at cs dot vu dot nl
                   ` (52 more replies)
  0 siblings, 53 replies; 54+ messages in thread
From: lvoge at cs dot vu dot nl @ 2004-03-07 22:13 UTC (permalink / raw)
  To: gcc-bugs

excuse me if this is stupidity on my part or me not understanding C properly, but:

int main() {
        int t[123] = { 1024 }, d;

        d = 0;
        d = t[d]++;
        printf("%d\n", d);
        return 0;
}

dumps core when compiled with -O2 on intel. the trouble is that the fifth line
gets compiled as if it says d = t[d]; t[d]++;, it re-uses the register to index
the increment that just got the result of the dereference.

compiles and runs correctly with any optimization with the Intel compiler v7.0.
gcc without optimization runs correctly on intel. gcc on sparc64 and ppc with
any optimization also runs correctly.

-- 
           Summary: x86 optimizer error (?)
           Product: gcc
           Version: 3.3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: lvoge at cs dot vu dot nl
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: GNU C version 3.3.3 (Debian) (i486-linux)
  GCC host triplet: GNU C version 3.3.3 (Debian) (i486-linux)
GCC target triplet: GNU C version 3.3.3 (Debian) (i486-linux)


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


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

* [Bug c/14470] x86 optimizer error (?)
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
@ 2004-03-07 22:26 ` lvoge at cs dot vu dot nl
  2004-03-07 22:36 ` bangerth at dealii dot org
                   ` (51 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: lvoge at cs dot vu dot nl @ 2004-03-07 22:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lvoge at cs dot vu dot nl  2004-03-07 22:26 -------
sorry, forgot to mention: fails for -O as well.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  GCC build triplet|GNU C version 3.3.3 (Debian)|i686-pc-linux-gnu
                   |(i486-linux)                |
   GCC host triplet|GNU C version 3.3.3 (Debian)|i686-pc-linux-gnu
                   |(i486-linux)                |
 GCC target triplet|GNU C version 3.3.3 (Debian)|i686-pc-linux-gnu
                   |(i486-linux)                |


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


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

* [Bug c/14470] x86 optimizer error (?)
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
  2004-03-07 22:26 ` [Bug c/14470] " lvoge at cs dot vu dot nl
@ 2004-03-07 22:36 ` bangerth at dealii dot org
  2004-03-07 22:43 ` lvoge at cs dot vu dot nl
                   ` (50 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: bangerth at dealii dot org @ 2004-03-07 22:36 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2004-03-07 22:36 -------
I can't reproduce this. Can you post the exact compile line and the output 
of what gcc -v says? 
 
Thanks 
  W. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


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


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

* [Bug c/14470] x86 optimizer error (?)
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
  2004-03-07 22:26 ` [Bug c/14470] " lvoge at cs dot vu dot nl
  2004-03-07 22:36 ` bangerth at dealii dot org
@ 2004-03-07 22:43 ` lvoge at cs dot vu dot nl
  2004-03-07 22:56 ` giovannibajo at libero dot it
                   ` (49 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: lvoge at cs dot vu dot nl @ 2004-03-07 22:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lvoge at cs dot vu dot nl  2004-03-07 22:43 -------
(In reply to comment #2)
> I can't reproduce this. Can you post the exact compile line and the output 
> of what gcc -v says? 

strange that you can't reproduce. I tried it on my own system, FreeBSD 5.2.1 and
the system I initially ran into it, which is RedHat 6 on gcc 3.2.2. this is gcc
-v on my system:

$ gcc -v
Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.3/specs
Configured with: ../src/configure -v
--enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info
--with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib
--enable-nls --without-included-gettext --enable-__cxa_atexit
--enable-clocale=gnu --enable-debug --enable-java-gc=boehm
--enable-java-awt=xlib --enable-objc-gc i486-linux
Thread model: posix
gcc version 3.3.3 (Debian)

and I compile with:

$ gcc -o fout fout.c -O
$ ./fout
Segmentation fault

the problem seems this:

        movl    -504(%ebp), %eax
        incl    -504(%ebp,%eax,4)

move t[0] into d, use d to index the increment.

but just so I know, even though this construct could perhaps be written more
clearly, this should theoretically work, right?

-- 


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


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

* [Bug c/14470] x86 optimizer error (?)
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (2 preceding siblings ...)
  2004-03-07 22:43 ` lvoge at cs dot vu dot nl
@ 2004-03-07 22:56 ` giovannibajo at libero dot it
  2004-03-07 23:12 ` falk at debian dot org
                   ` (48 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: giovannibajo at libero dot it @ 2004-03-07 22:56 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-03-07 22:56 -------
I can't reproduce it either. I tried 3.3.1, 3.3.3 and 3.4.0.

-- 


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


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

* [Bug c/14470] x86 optimizer error (?)
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (3 preceding siblings ...)
  2004-03-07 22:56 ` giovannibajo at libero dot it
@ 2004-03-07 23:12 ` falk at debian dot org
  2004-03-07 23:19 ` lvoge at cs dot vu dot nl
                   ` (47 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: falk at debian dot org @ 2004-03-07 23:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From falk at debian dot org  2004-03-07 23:12 -------
Maybe this is because Debian defaults to 486 or something? Can you please
post output of gcc -v -c file.c?

-- 


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


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

* [Bug c/14470] x86 optimizer error (?)
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (4 preceding siblings ...)
  2004-03-07 23:12 ` falk at debian dot org
@ 2004-03-07 23:19 ` lvoge at cs dot vu dot nl
  2004-03-07 23:57 ` pinskia at gcc dot gnu dot org
                   ` (46 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: lvoge at cs dot vu dot nl @ 2004-03-07 23:19 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lvoge at cs dot vu dot nl  2004-03-07 23:19 -------
(In reply to comment #5)
> Maybe this is because Debian defaults to 486 or something?

I tried -mcpu=i686 -march=i686, gives the same assembly code.

another strange thing, by the way, is if I don't specify an -O level, but do
specify all individual optimizations the manpage lists as -O consisting of, it
works.

> Can you please post output of gcc -v -c file.c?

$ gcc -v -c fout.c
Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.3/specs
Configured with: ../src/configure -v
--enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info
--with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib
--enable-nls --without-included-gettext --enable-__cxa_atexit
--enable-clocale=gnu --enable-debug --enable-java-gc=boehm
--enable-java-awt=xlib --enable-objc-gc i486-linux
Thread model: posix
gcc version 3.3.3 (Debian 20040306)
 /usr/lib/gcc-lib/i486-linux/3.3.3/cc1 -quiet -v -D__GNUC__=3 -D__GNUC_MINOR__=3
-D__GNUC_PATCHLEVEL__=3 fout.c -quiet -dumpbase fout.c -auxbase fout -version -o
/tmp/ccA8GeAm.s
GNU C version 3.3.3 (Debian 20040306) (i486-linux)
        compiled by GNU C version 3.3.3 (Debian 20040306).
GGC heuristics: --param ggc-min-expand=99 --param ggc-min-heapsize=129440
ignoring nonexistent directory "/usr/i486-linux/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/lib/gcc-lib/i486-linux/3.3.3/include
 /usr/include
End of search list.
 as -V -Qy -o fout.o /tmp/ccA8GeAm.s
GNU assembler version 2.14.90.0.7 (i386-linux) using BFD version 2.14.90.0.7
20031029 Debian GNU/Linux




-- 


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


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

* [Bug c/14470] x86 optimizer error (?)
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (5 preceding siblings ...)
  2004-03-07 23:19 ` lvoge at cs dot vu dot nl
@ 2004-03-07 23:57 ` pinskia at gcc dot gnu dot org
  2004-03-08  0:57 ` pinskia at gcc dot gnu dot org
                   ` (45 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-07 23:57 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-07 23:57 -------
Not a bug as you do not have a sequence point between the modification of d.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |INVALID


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


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

* [Bug c/14470] x86 optimizer error (?)
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (6 preceding siblings ...)
  2004-03-07 23:57 ` pinskia at gcc dot gnu dot org
@ 2004-03-08  0:57 ` pinskia at gcc dot gnu dot org
  2004-03-08  1:47 ` amodra at bigpond dot net dot au
                   ` (44 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-08  0:57 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-08 00:57 -------
Let me re-explain myself.
The problem is that d gets modified before the asignment back to t[d].  This what is expanded on the 
tree-ssa, see how the modification of d happens before the assignment back to t[d].
  T.1 = t[d];
  d = T.1;
  T.2 = T.1 + 1;
  t[d] = T.2;

-- 


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


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

* [Bug c/14470] x86 optimizer error (?)
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (7 preceding siblings ...)
  2004-03-08  0:57 ` pinskia at gcc dot gnu dot org
@ 2004-03-08  1:47 ` amodra at bigpond dot net dot au
  2004-03-08  3:12 ` zack at gcc dot gnu dot org
                   ` (43 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: amodra at bigpond dot net dot au @ 2004-03-08  1:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From amodra at bigpond dot net dot au  2004-03-08 01:47 -------
tree-ssa behaviour shouldn't be taken as gospel truth.  I'm not a language
lawyer, so the following should perhaps be taken with a grain of salt.

Here are some relevant quotes from ISO/IEC 9899:1999 (E)

6.5 item 2 "Between the previous and next sequence point an object shall have
its stored value modified at most once by the evaluation of an expression.
Furthermore, the prior value shall be read only to determine the value to be
stored."

6.5.2.4 item 2 "The result of the postfix ++ operator is the value of the
operand. After the result is obtained, the value of the operand is incremented."

I can't see that the expression is running foul of 6.5 item 2; d is modified
once, t[0] is modified once.  I think tree-ssa is miscalculating "the value of
the operand" referred to in 6.5.2.4 item 2.

-- 


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


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

* [Bug c/14470] x86 optimizer error (?)
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (8 preceding siblings ...)
  2004-03-08  1:47 ` amodra at bigpond dot net dot au
@ 2004-03-08  3:12 ` zack at gcc dot gnu dot org
  2004-03-08  4:35 ` bangerth at dealii dot org
                   ` (42 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: zack at gcc dot gnu dot org @ 2004-03-08  3:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From zack at gcc dot gnu dot org  2004-03-08 03:12 -------
In the line 

 d = t[d]++;

the postincrement is applied to t[d], not d.  This code is valid; it should
print 1024 and set t[0] to 1025.

The very similar

 d = t[d++];

is indeed invalid.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |


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


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

* [Bug c/14470] x86 optimizer error (?)
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (9 preceding siblings ...)
  2004-03-08  3:12 ` zack at gcc dot gnu dot org
@ 2004-03-08  4:35 ` bangerth at dealii dot org
  2004-03-08  5:05 ` giovannibajo at libero dot it
                   ` (41 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: bangerth at dealii dot org @ 2004-03-08  4:35 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2004-03-08 04:35 -------
I see that you are using a Debian version of the compiler. Would you 
mind trying an FSF version? Maybe it is one of Debian's patches that's 
causing this... 
 
W. 
 

-- 


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


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

* [Bug c/14470] x86 optimizer error (?)
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (10 preceding siblings ...)
  2004-03-08  4:35 ` bangerth at dealii dot org
@ 2004-03-08  5:05 ` giovannibajo at libero dot it
  2004-03-08  5:30 ` zack at gcc dot gnu dot org
                   ` (40 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: giovannibajo at libero dot it @ 2004-03-08  5:05 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-03-08 05:04 -------
Given comment #8 by Andrew, it would seem this can be reproduced on tree-ssa at 
least...

-- 


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


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

* [Bug c/14470] x86 optimizer error (?)
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (11 preceding siblings ...)
  2004-03-08  5:05 ` giovannibajo at libero dot it
@ 2004-03-08  5:30 ` zack at gcc dot gnu dot org
  2004-03-08  9:13 ` [Bug optimization/14470] [3.4/3.5 regression] trouble with post-increment reichelt at gcc dot gnu dot org
                   ` (39 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: zack at gcc dot gnu dot org @ 2004-03-08  5:30 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From zack at gcc dot gnu dot org  2004-03-08 05:29 -------
I can reproduce the bug with 3.2, 3.3, 3.4, and mainline (but not with 2.95)
using unmodified FSF sources.  The problem y'all are probably having, is that
this program may or may not crash depending on stack layout.  I've got an a.out
that reproducibly crashes on one machine and not on another.

I'm going to attach a modified test program which exhibits variable output
instead of crashing.

$ ./a.out-O0
1024 1025 0
$ ./a.out-O2
1024 1024 1
$ ./xgcc -B./ -v
Reading specs from ./specs
Configured with: /home/zack/src/gcc/3.4/vanilla/configure
--prefix=/home/zack/src/i/gcc_ni --disable-checking --enable-threads
--enable-languages=c,c++ --disable-nls
Thread model: posix
gcc version 3.4.0 20040301 (prerelease)

(The -O0 output is correct.)

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-03-08 05:29:59
               date|                            |


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


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

* [Bug optimization/14470] [3.4/3.5 regression] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (12 preceding siblings ...)
  2004-03-08  5:30 ` zack at gcc dot gnu dot org
@ 2004-03-08  9:13 ` reichelt at gcc dot gnu dot org
  2004-03-08  9:17 ` [Bug optimization/14470] [3.3/3.4/3.5 " reichelt at gcc dot gnu dot org
                   ` (38 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-03-08  9:13 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |reichelt at gcc dot gnu dot
                   |                            |org
           Severity|normal                      |critical
          Component|c                           |optimization
           Keywords|                            |wrong-code
      Known to fail|                            |3.1 3.1.1 3.1.2 3.2 3.2.1
                   |                            |3.2.2 3.2.3 3.3 3.3.1 3.3.2
                   |                            |3.3.3 3.3.4 3.4.0 3.5.0
      Known to work|                            |3.0.4
            Summary|x86 optimizer error (?)     |[3.4/3.5 regression] trouble
                   |                            |with post-increment


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


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

* [Bug optimization/14470] [3.3/3.4/3.5 regression] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (13 preceding siblings ...)
  2004-03-08  9:13 ` [Bug optimization/14470] [3.4/3.5 regression] trouble with post-increment reichelt at gcc dot gnu dot org
@ 2004-03-08  9:17 ` reichelt at gcc dot gnu dot org
  2004-03-08  9:37 ` ebotcazou at gcc dot gnu dot org
                   ` (37 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-03-08  9:17 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[3.4/3.5 regression] trouble|[3.3/3.4/3.5 regression]
                   |with post-increment         |trouble with post-increment
   Target Milestone|---                         |3.3.4


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


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

* [Bug optimization/14470] [3.3/3.4/3.5 regression] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (14 preceding siblings ...)
  2004-03-08  9:17 ` [Bug optimization/14470] [3.3/3.4/3.5 " reichelt at gcc dot gnu dot org
@ 2004-03-08  9:37 ` ebotcazou at gcc dot gnu dot org
  2004-03-08 10:13 ` jsm at polyomino dot org dot uk
                   ` (36 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-03-08  9:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2004-03-08 09:37 -------
Investigating.


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


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


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

* [Bug optimization/14470] [3.3/3.4/3.5 regression] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (15 preceding siblings ...)
  2004-03-08  9:37 ` ebotcazou at gcc dot gnu dot org
@ 2004-03-08 10:13 ` jsm at polyomino dot org dot uk
  2004-03-11  6:34 ` [Bug middle-end/14470] " ebotcazou at gcc dot gnu dot org
                   ` (35 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: jsm at polyomino dot org dot uk @ 2004-03-08 10:13 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From jsm at polyomino dot org dot uk  2004-03-08 10:13 -------
Subject: Re:  x86 optimizer error (?)

On Mon, 8 Mar 2004, zack at gcc dot gnu dot org wrote:

> In the line 
> 
>  d = t[d]++;
> 
> the postincrement is applied to t[d], not d.  This code is valid; it should
> print 1024 and set t[0] to 1025.

The question is whether the access to d on the RHS is only to determine
the value to be stored.  An analysis of what some or all of N925, N926,
N927 (linked to from readings.html), N993, N1001, N1008, N1013 (some of
which may supplement or supersede earlier papers) and Norrish's thesis say
on this question would be useful in determining whether this is a bug -
and if any of them differ, this bug report is an indication that cleaning
up these matters in the C standard is of genuine real-world relevance.



-- 


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


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

* [Bug middle-end/14470] [3.3/3.4/3.5 regression] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (16 preceding siblings ...)
  2004-03-08 10:13 ` jsm at polyomino dot org dot uk
@ 2004-03-11  6:34 ` ebotcazou at gcc dot gnu dot org
  2004-03-13  2:53 ` [Bug middle-end/14470] [3.4 " gdr at gcc dot gnu dot org
                   ` (34 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-03-11  6:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2004-03-11 06:34 -------
Patch: http://gcc.gnu.org/ml/gcc-patches/2004-03/msg00768.html already approved
for mainline by Roger.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mmitchel at gcc dot gnu dot
                   |                            |org
           Keywords|                            |patch


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


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

* [Bug middle-end/14470] [3.4 regression] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (17 preceding siblings ...)
  2004-03-11  6:34 ` [Bug middle-end/14470] " ebotcazou at gcc dot gnu dot org
@ 2004-03-13  2:53 ` gdr at gcc dot gnu dot org
  2004-03-13  3:03 ` cvs-commit at gcc dot gnu dot org
                   ` (33 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: gdr at gcc dot gnu dot org @ 2004-03-13  2:53 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at gcc dot gnu dot org  2004-03-13 02:53 -------
Patch applied to GCC-3.3.4.
Now only 3.4.x regression.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|3.1 3.1.1 3.1.2 3.2 3.2.1   |3.1 3.1.1 3.1.2 3.2 3.2.1
                   |3.2.2 3.2.3 3.3 3.3.1 3.3.2 |3.2.2 3.2.3 3.3 3.3.1 3.3.2
                   |3.3.3 3.3.4 3.4.0 3.5.0     |3.3.3 3.4.0
      Known to work|3.0.4                       |3.0.4 3.3.4 3.5.0
            Summary|[3.3/3.4/3.5 regression]    |[3.4 regression] trouble
                   |trouble with post-increment |with post-increment
   Target Milestone|3.3.4                       |3.4.0


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


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

* [Bug middle-end/14470] [3.4 regression] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (18 preceding siblings ...)
  2004-03-13  2:53 ` [Bug middle-end/14470] [3.4 " gdr at gcc dot gnu dot org
@ 2004-03-13  3:03 ` cvs-commit at gcc dot gnu dot org
  2004-03-13 16:20 ` [Bug middle-end/14470] [3.4/3.5 regression] [tree-ssa] " mmitchel at gcc dot gnu dot org
                   ` (32 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-13  3:03 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-03-13 03:03 -------
Subject: Bug 14470

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_3-branch
Changes by:	gdr@gcc.gnu.org	2004-03-13 03:03:38

Modified files:
	gcc            : ChangeLog expr.c 
Added files:
	gcc/testsuite/gcc.c-torture/execute: 20040309-1.c 

Log message:
	Backport:
	2004-03-09  Eric Botcazou  <ebotcazou@libertysurf.fr>
	PR middle-end/14470
	* expr.c (store_expr): Call emit_queue before generating the move
	from the temporary to the original target.  Protect the	temporary
	from emit_queue.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.938&r2=1.16114.2.939
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/expr.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.498.2.24&r2=1.498.2.25
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/20040309-1.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.2.1



-- 


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


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

* [Bug middle-end/14470] [3.4/3.5 regression] [tree-ssa] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (19 preceding siblings ...)
  2004-03-13  3:03 ` cvs-commit at gcc dot gnu dot org
@ 2004-03-13 16:20 ` mmitchel at gcc dot gnu dot org
  2004-03-13 18:16 ` cvs-commit at gcc dot gnu dot org
                   ` (31 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-03-13 16:20 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-03-13 16:20 -------
OK for 3.4.0.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at libertysurf dot
                   |                            |fr


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


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

* [Bug middle-end/14470] [3.4/3.5 regression] [tree-ssa] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (20 preceding siblings ...)
  2004-03-13 16:20 ` [Bug middle-end/14470] [3.4/3.5 regression] [tree-ssa] " mmitchel at gcc dot gnu dot org
@ 2004-03-13 18:16 ` cvs-commit at gcc dot gnu dot org
  2004-03-13 18:26 ` [Bug middle-end/14470] [3.4 " pinskia at gcc dot gnu dot org
                   ` (30 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-13 18:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-03-13 18:16 -------
Subject: Bug 14470

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	ebotcazou@gcc.gnu.org	2004-03-13 18:16:14

Modified files:
	gcc            : ChangeLog expr.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.c-torture/execute: 20040313-1.c 

Log message:
	PR middle-end/14470
	* expr.c (store_expr): Call emit_queue before generating the move
	from the temporary to the original target.  Protect the temporary
	from emit_queue.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.3159&r2=2.3160
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/expr.c.diff?cvsroot=gcc&r1=1.631&r2=1.632
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3602&r2=1.3603
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/20040313-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug middle-end/14470] [3.4 regression] [tree-ssa] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (22 preceding siblings ...)
  2004-03-13 18:26 ` [Bug middle-end/14470] [3.4 " pinskia at gcc dot gnu dot org
@ 2004-03-13 18:26 ` cvs-commit at gcc dot gnu dot org
  2004-03-13 18:29 ` [Bug middle-end/14470] " pinskia at gcc dot gnu dot org
                   ` (28 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-13 18:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-03-13 18:26 -------
Subject: Bug 14470

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	ebotcazou@gcc.gnu.org	2004-03-13 18:26:24

Modified files:
	gcc            : ChangeLog expr.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.c-torture/execute: 20040313-1.c 

Log message:
	PR middle-end/14470
	* expr.c (store_expr): Call emit_queue before generating the move
	from the temporary to the original target.  Protect the temporary
	from emit_queue.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.338&r2=2.2326.2.339
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/expr.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.615.4.8&r2=1.615.4.9
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.142&r2=1.3389.2.143
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/20040313-1.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1



-- 


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


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

* [Bug middle-end/14470] [3.4 regression] [tree-ssa] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (21 preceding siblings ...)
  2004-03-13 18:16 ` cvs-commit at gcc dot gnu dot org
@ 2004-03-13 18:26 ` pinskia at gcc dot gnu dot org
  2004-03-13 18:26 ` cvs-commit at gcc dot gnu dot org
                   ` (29 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-13 18:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-03-13 18:26 -------
Subject: Bug 14470

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	ebotcazou@gcc.gnu.org	2004-03-13 18:26:24

Modified files:
	gcc            : ChangeLog expr.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.c-torture/execute: 20040313-1.c 

Log message:
	PR middle-end/14470
	* expr.c (store_expr): Call emit_queue before generating the move
	from the temporary to the original target.  Protect the temporary
	from emit_queue.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.338&r2=2.2326.2.339
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/expr.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.615.4.8&r2=1.615.4.9
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.142&r2=1.3389.2.143
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/20040313-1.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|3.1 3.1.1 3.1.2 3.2 3.2.1   |3.1 3.1.1 3.1.2 3.2 3.2.1
                   |3.2.2 3.2.3 3.3 3.3.1 3.3.2 |3.2.2 3.2.3 3.3 3.3.1 3.3.2
                   |3.3.3 3.4.0 3.5.0           |3.3.3 3.4.0 3.5.0 tree-ssa


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


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

* [Bug middle-end/14470] [tree-ssa] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (23 preceding siblings ...)
  2004-03-13 18:26 ` cvs-commit at gcc dot gnu dot org
@ 2004-03-13 18:29 ` pinskia at gcc dot gnu dot org
  2004-03-13 18:32 ` cvs-commit at gcc dot gnu dot org
                   ` (27 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-13 18:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-13 18:29 -------
Fixed in 3.3.4 and 3.4.0 and on the mainline but still busted in the tree-ssa.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|ebotcazou at gcc dot gnu dot|unassigned at gcc dot gnu
                   |org                         |dot org
             Status|ASSIGNED                    |NEW
      Known to fail|3.1 3.1.1 3.1.2 3.2 3.2.1   |3.1 3.1.1 3.1.2 3.2 3.2.1
                   |3.2.2 3.2.3 3.3 3.3.1 3.3.2 |3.2.2 3.2.3 3.3 3.3.1 3.3.2
                   |3.3.3 3.4.0 3.5.0 tree-ssa  |3.3.3 tree-ssa
      Known to work|3.0.4 3.3.4                 |3.0.4 3.3.4 3.4.0
            Summary|[3.4 regression] [tree-ssa] |[tree-ssa] trouble with
                   |trouble with post-increment |post-increment
   Target Milestone|3.4.0                       |tree-ssa


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


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

* [Bug middle-end/14470] [tree-ssa] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (24 preceding siblings ...)
  2004-03-13 18:29 ` [Bug middle-end/14470] " pinskia at gcc dot gnu dot org
@ 2004-03-13 18:32 ` cvs-commit at gcc dot gnu dot org
  2004-03-13 18:42 ` ebotcazou at gcc dot gnu dot org
                   ` (26 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-13 18:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-03-13 18:32 -------
Subject: Bug 14470

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_3-branch
Changes by:	ebotcazou@gcc.gnu.org	2004-03-13 18:32:25

Modified files:
	gcc            : ChangeLog 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.c-torture/execute: 20040313-1.c 
Removed files:
	gcc/testsuite/gcc.c-torture/execute: 20040309-1.c 

Log message:
	PR middle-end/14470
	* gcc.c-torture/execute/20040313-1.c: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.941&r2=1.16114.2.942
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.2261.2.366&r2=1.2261.2.367
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/20040313-1.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.4.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/20040309-1.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.1.2.1&r2=NONE



-- 


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


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

* [Bug middle-end/14470] [tree-ssa] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (25 preceding siblings ...)
  2004-03-13 18:32 ` cvs-commit at gcc dot gnu dot org
@ 2004-03-13 18:42 ` ebotcazou at gcc dot gnu dot org
  2004-03-13 18:52 ` pinskia at gcc dot gnu dot org
                   ` (25 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-03-13 18:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2004-03-13 18:42 -------
Please do not unassign behind my back.  Thanks.

Any reason to think it won't be fixed by the next merge?


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |ebotcazou at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
      Known to work|3.0.4 3.3.4 3.4.0           |3.0.4 3.3.4 3.4.0 3.5.0


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


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

* [Bug middle-end/14470] [tree-ssa] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (26 preceding siblings ...)
  2004-03-13 18:42 ` ebotcazou at gcc dot gnu dot org
@ 2004-03-13 18:52 ` pinskia at gcc dot gnu dot org
  2004-03-13 19:01 ` ebotcazou at gcc dot gnu dot org
                   ` (24 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-13 18:52 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-13 18:52 -------
Yes the reason why it is not going to be fixed by the next merge is because it is broken before it gets to 
where you fixed the issue.

-- 


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


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

* [Bug middle-end/14470] [tree-ssa] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (27 preceding siblings ...)
  2004-03-13 18:52 ` pinskia at gcc dot gnu dot org
@ 2004-03-13 19:01 ` ebotcazou at gcc dot gnu dot org
  2004-03-19 15:56 ` rearnsha at gcc dot gnu dot org
                   ` (23 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-03-13 19:01 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2004-03-13 19:01 -------
Ah! Ok, thanks for the explanation.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot gnu dot
                   |                            |org
         AssignedTo|ebotcazou at gcc dot gnu dot|unassigned at gcc dot gnu
                   |org                         |dot org
             Status|ASSIGNED                    |NEW


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


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

* [Bug middle-end/14470] [tree-ssa] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (28 preceding siblings ...)
  2004-03-13 19:01 ` ebotcazou at gcc dot gnu dot org
@ 2004-03-19 15:56 ` rearnsha at gcc dot gnu dot org
  2004-03-19 17:04 ` mmitchel at gcc dot gnu dot org
                   ` (22 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2004-03-19 15:56 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rearnsha at gcc dot gnu dot org  2004-03-19 15:56 -------
Eric,

Your patch is causing massive code size explosion on some files.  For example,
in CSiBE gsm/gsm_encode.o on ARM -Os explodes from 1396 to 3172 bytes (a 125%
code size increase!).

I really think we need to find a better solution than this.



-- 


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


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

* [Bug middle-end/14470] [tree-ssa] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (29 preceding siblings ...)
  2004-03-19 15:56 ` rearnsha at gcc dot gnu dot org
@ 2004-03-19 17:04 ` mmitchel at gcc dot gnu dot org
  2004-03-19 17:07 ` rearnsha at arm dot com
                   ` (21 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-03-19 17:04 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-03-19 17:04 -------
Richard, are you seeing this explosion in 3.4.0 as well as in tree-ssa?

-- 


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


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

* [Bug middle-end/14470] [tree-ssa] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (30 preceding siblings ...)
  2004-03-19 17:04 ` mmitchel at gcc dot gnu dot org
@ 2004-03-19 17:07 ` rearnsha at arm dot com
  2004-03-19 17:09 ` richard dot earnshaw at arm dot com
                   ` (20 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: rearnsha at arm dot com @ 2004-03-19 17:07 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rearnsha at arm dot com  2004-03-19 17:07 -------
Subject: Re:  [tree-ssa] trouble with post-increment 

It seems that one of the effects of this patch is that it completely 
disables the POST_INC optimization (probably by changing the idiom that it 
needs to recognize).

R.



-- 


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


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

* [Bug middle-end/14470] [tree-ssa] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (31 preceding siblings ...)
  2004-03-19 17:07 ` rearnsha at arm dot com
@ 2004-03-19 17:09 ` richard dot earnshaw at arm dot com
  2004-03-19 17:59 ` ebotcazou at gcc dot gnu dot org
                   ` (19 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: richard dot earnshaw at arm dot com @ 2004-03-19 17:09 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From richard dot earnshaw at arm dot com  2004-03-19 17:09 -------
Subject: Re:  [tree-ssa] trouble with post-increment

On Fri, 2004-03-19 at 17:04, mmitchel at gcc dot gnu dot org wrote:
> Richard, are you seeing this explosion in 3.4.0 as well as in tree-ssa?
I haven't tried tree-ssa.  I'm seeing it on the trunk.  I expect that
3.4 will be the same.

R.


-- 


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


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

* [Bug middle-end/14470] [tree-ssa] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (32 preceding siblings ...)
  2004-03-19 17:09 ` richard dot earnshaw at arm dot com
@ 2004-03-19 17:59 ` ebotcazou at gcc dot gnu dot org
  2004-03-19 17:59 ` ebotcazou at gcc dot gnu dot org
                   ` (18 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-03-19 17:59 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2004-03-19 17:59 -------
I'm not really surprised by the side-effect, the problem is located at a pretty
hot spot in the middle-end.  I'd suggest to revert the patch everywhere and
re-target the bug to 3.4.1 at least.

Richard, could you provide me with a preprocessed testcase?  Thanks in advance.

-- 


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


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

* [Bug middle-end/14470] [tree-ssa] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (33 preceding siblings ...)
  2004-03-19 17:59 ` ebotcazou at gcc dot gnu dot org
@ 2004-03-19 17:59 ` ebotcazou at gcc dot gnu dot org
  2004-03-19 23:26 ` ebotcazou at gcc dot gnu dot org
                   ` (17 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-03-19 17:59 UTC (permalink / raw)
  To: gcc-bugs



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


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


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

* [Bug middle-end/14470] [tree-ssa] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (34 preceding siblings ...)
  2004-03-19 17:59 ` ebotcazou at gcc dot gnu dot org
@ 2004-03-19 23:26 ` ebotcazou at gcc dot gnu dot org
  2004-03-20 13:40 ` ebotcazou at gcc dot gnu dot org
                   ` (16 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-03-19 23:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2004-03-19 23:26 -------
OK, I understand the problem: POST_INC is indeed effectively disabled for
certain move targets because the increment queue is emitted after the source has
been expanded to a temporary but before the move from the temporary to the
target is.

What I needed to fix the PR is to ensure that the increment queue for the
*source* is emitted before the move, not necessarily for the target.  Therefore
I think the correct fix is to introduce nesting levels for increment queues.

-- 


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


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

* [Bug middle-end/14470] [tree-ssa] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (35 preceding siblings ...)
  2004-03-19 23:26 ` ebotcazou at gcc dot gnu dot org
@ 2004-03-20 13:40 ` ebotcazou at gcc dot gnu dot org
  2004-03-21 19:26 ` mmitchel at gcc dot gnu dot org
                   ` (15 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-03-20 13:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2004-03-20 13:40 -------
Well, nesting levels might be overkill.  It appears that marking the queue is
sufficient.

Richard, the attached patch fixes the problem for the testcase you submitted. 
Could you see if it restores the initial state of CSiBE on ARM?  TIA.


-- 


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


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

* [Bug middle-end/14470] [tree-ssa] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (36 preceding siblings ...)
  2004-03-20 13:40 ` ebotcazou at gcc dot gnu dot org
@ 2004-03-21 19:26 ` mmitchel at gcc dot gnu dot org
  2004-03-22 11:59 ` cvs-commit at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-03-21 19:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-03-21 19:26 -------
This new patch is OK.  Thanks.

-- 


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


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

* [Bug middle-end/14470] [tree-ssa] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (37 preceding siblings ...)
  2004-03-21 19:26 ` mmitchel at gcc dot gnu dot org
@ 2004-03-22 11:59 ` cvs-commit at gcc dot gnu dot org
  2004-03-22 12:09 ` cvs-commit at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-22 11:59 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-03-22 11:59 -------
Subject: Bug 14470

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	ebotcazou@gcc.gnu.org	2004-03-22 11:59:08

Modified files:
	gcc            : ChangeLog expr.c 

Log message:
	PR middle-end/14470
	* expr.c (mark_queue): New function.
	(emit_insns_enqueued_after_mark): New function replacing
	emit_queue.  Clear the body of emitted queued insns.
	(emit_queue): Call emit_insns_enqueued_after_mark.
	(store_expr): Mark the increment queue on entry.  Emit
	only the incrementations queued when expanding the source.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.3251&r2=2.3252
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/expr.c.diff?cvsroot=gcc&r1=1.634&r2=1.635



-- 


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


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

* [Bug middle-end/14470] [tree-ssa] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (38 preceding siblings ...)
  2004-03-22 11:59 ` cvs-commit at gcc dot gnu dot org
@ 2004-03-22 12:09 ` cvs-commit at gcc dot gnu dot org
  2004-03-22 16:31 ` ebotcazou at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-22 12:09 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-03-22 12:08 -------
Subject: Bug 14470

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	ebotcazou@gcc.gnu.org	2004-03-22 12:08:54

Modified files:
	gcc            : ChangeLog expr.c 

Log message:
	PR middle-end/14470
	* expr.c (mark_queue): New function.
	(emit_insns_enqueued_after_mark): New function replacing
	emit_queue.  Clear the body of emitted queued insns.
	(emit_queue): Call emit_insns_enqueued_after_mark.
	(store_expr): Mark the increment queue on entry.  Emit
	only the incrementations queued when expanding the source.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.360&r2=2.2326.2.361
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/expr.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.615.4.9&r2=1.615.4.10



-- 


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


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

* [Bug middle-end/14470] [tree-ssa] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (39 preceding siblings ...)
  2004-03-22 12:09 ` cvs-commit at gcc dot gnu dot org
@ 2004-03-22 16:31 ` ebotcazou at gcc dot gnu dot org
  2004-03-22 18:40 ` cvs-commit at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-03-22 16:31 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2004-03-22 16:31 -------
I don't plan to fix it on tree-ssa.


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


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


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

* [Bug middle-end/14470] [tree-ssa] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (40 preceding siblings ...)
  2004-03-22 16:31 ` ebotcazou at gcc dot gnu dot org
@ 2004-03-22 18:40 ` cvs-commit at gcc dot gnu dot org
  2004-05-01  1:38 ` dnovillo at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-22 18:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-03-22 18:40 -------
Subject: Bug 14470

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_3-branch
Changes by:	ebotcazou@gcc.gnu.org	2004-03-22 18:39:57

Modified files:
	gcc            : ChangeLog expr.c 

Log message:
	PR middle-end/14470
	* expr.c (mark_queue): New function.
	(emit_insns_enqueued_after_mark): New function replacing
	emit_queue.  Clear the body of emitted queued insns.
	(emit_queue): Call emit_insns_enqueued_after_mark.
	(store_expr): Mark the increment queue on entry.  Emit
	only the incrementations queued when expanding the source.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.948&r2=1.16114.2.949
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/expr.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.498.2.25&r2=1.498.2.26



-- 


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


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

* [Bug middle-end/14470] [tree-ssa] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (41 preceding siblings ...)
  2004-03-22 18:40 ` cvs-commit at gcc dot gnu dot org
@ 2004-05-01  1:38 ` dnovillo at gcc dot gnu dot org
  2004-05-03 14:42 ` dnovillo at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: dnovillo at gcc dot gnu dot org @ 2004-05-01  1:38 UTC (permalink / raw)
  To: gcc-bugs



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


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


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

* [Bug middle-end/14470] [tree-ssa] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (42 preceding siblings ...)
  2004-05-01  1:38 ` dnovillo at gcc dot gnu dot org
@ 2004-05-03 14:42 ` dnovillo at gcc dot gnu dot org
  2004-05-03 15:05 ` bangerth at dealii dot org
                   ` (8 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: dnovillo at gcc dot gnu dot org @ 2004-05-03 14:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dnovillo at gcc dot gnu dot org  2004-05-03 14:42 -------

Fixed for tree-ssa.  However, the fix is temporary.  The real fix exposes an
alias analysis bug that is to invasive to fix in the freeze period (see
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15262).

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


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


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

* [Bug middle-end/14470] [tree-ssa] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (43 preceding siblings ...)
  2004-05-03 14:42 ` dnovillo at gcc dot gnu dot org
@ 2004-05-03 15:05 ` bangerth at dealii dot org
  2004-05-03 15:09 ` dnovillo at redhat dot com
                   ` (7 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: bangerth at dealii dot org @ 2004-05-03 15:05 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2004-05-03 15:05 -------
Diego, 
if there is a known bug that you can't fix right now, would you mind making 
sure there is an open PR for it so that it doesn't get forgotten? 
 
Thanks 
 Wolfgang 

-- 


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


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

* [Bug middle-end/14470] [tree-ssa] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (44 preceding siblings ...)
  2004-05-03 15:05 ` bangerth at dealii dot org
@ 2004-05-03 15:09 ` dnovillo at redhat dot com
  2004-05-03 15:12 ` reichelt at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: dnovillo at redhat dot com @ 2004-05-03 15:09 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dnovillo at redhat dot com  2004-05-03 15:09 -------
Subject: Re:  [tree-ssa] trouble with post-increment

On Mon, 2004-05-03 at 11:05, bangerth at dealii dot org wrote:
> ------- Additional Comments From bangerth at dealii dot org  2004-05-03 15:05 -------
> Diego, 
> if there is a known bug that you can't fix right now, would you mind making 
> sure there is an open PR for it so that it doesn't get forgotten? 
>  
There is one already.  PR 15262.  Not fixing this will also trigger
testsuite regressions.  We could also just leave this PR open.  I've no
strong preferences.


Diego.



-- 


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


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

* [Bug middle-end/14470] [tree-ssa] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (45 preceding siblings ...)
  2004-05-03 15:09 ` dnovillo at redhat dot com
@ 2004-05-03 15:12 ` reichelt at gcc dot gnu dot org
  2004-05-03 15:13 ` reichelt at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-05-03 15:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2004-05-03 15:12 -------
Reopening bug ...

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |15262
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |


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


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

* [Bug middle-end/14470] [tree-ssa] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (46 preceding siblings ...)
  2004-05-03 15:12 ` reichelt at gcc dot gnu dot org
@ 2004-05-03 15:13 ` reichelt at gcc dot gnu dot org
  2004-05-03 15:31 ` bangerth at dealii dot org
                   ` (4 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-05-03 15:13 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2004-05-03 15:13 -------
... to mark as suspended.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |SUSPENDED


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


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

* [Bug middle-end/14470] [tree-ssa] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (47 preceding siblings ...)
  2004-05-03 15:13 ` reichelt at gcc dot gnu dot org
@ 2004-05-03 15:31 ` bangerth at dealii dot org
  2004-05-13 21:52 ` [Bug tree-optimization/14470] " pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: bangerth at dealii dot org @ 2004-05-03 15:31 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2004-05-03 15:31 -------
Ah, thanks everyone. I just missed the connection between the two PRs... 
 
W. 

-- 


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


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

* [Bug tree-optimization/14470] [tree-ssa] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (48 preceding siblings ...)
  2004-05-03 15:31 ` bangerth at dealii dot org
@ 2004-05-13 21:52 ` pinskia at gcc dot gnu dot org
  2004-09-14 22:58 ` dnovillo at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  52 siblings, 0 replies; 54+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-13 21:52 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|tree-ssa                    |3.5.0


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


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

* [Bug tree-optimization/14470] [tree-ssa] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (49 preceding siblings ...)
  2004-05-13 21:52 ` [Bug tree-optimization/14470] " pinskia at gcc dot gnu dot org
@ 2004-09-14 22:58 ` dnovillo at gcc dot gnu dot org
  2004-09-17  3:53 ` pinskia at gcc dot gnu dot org
  2004-09-18 15:44 ` dnovillo at gcc dot gnu dot org
  52 siblings, 0 replies; 54+ messages in thread
From: dnovillo at gcc dot gnu dot org @ 2004-09-14 22:58 UTC (permalink / raw)
  To: gcc-bugs



-- 
Bug 14470 depends on bug 15262, which changed state.

Bug 15262 Summary: [4.0 Regression] [tree-ssa] Alias analyzer cannot handle addressable fields
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15262

           What    |Old Value                   |New Value
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

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


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

* [Bug tree-optimization/14470] [tree-ssa] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (50 preceding siblings ...)
  2004-09-14 22:58 ` dnovillo at gcc dot gnu dot org
@ 2004-09-17  3:53 ` pinskia at gcc dot gnu dot org
  2004-09-18 15:44 ` dnovillo at gcc dot gnu dot org
  52 siblings, 0 replies; 54+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-17  3:53 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-09-17 03:53 -------
Can't this now be fixed correctly?

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|3.0.4 3.3.4 3.4.0 4.0       |3.0.4 3.3.4 3.4.0 4.0.0


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


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

* [Bug tree-optimization/14470] [tree-ssa] trouble with post-increment
  2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
                   ` (51 preceding siblings ...)
  2004-09-17  3:53 ` pinskia at gcc dot gnu dot org
@ 2004-09-18 15:44 ` dnovillo at gcc dot gnu dot org
  52 siblings, 0 replies; 54+ messages in thread
From: dnovillo at gcc dot gnu dot org @ 2004-09-18 15:44 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dnovillo at gcc dot gnu dot org  2004-09-18 15:44 -------

Fixed.  This is with current CVS mainline:

$ cat pr14470.c.t08.gimple

;; Function main (main)

main ()
{
  static int C.0[1025] = {1024};
  int d.1;
  int D.1122;
  int D.1123;
  int D.1124;
  int D.1125;
  int D.1126;
  int t[1025];
  int d;

  t = C.0;
  d = 0;
  d.1 = d;
  D.1122 = t[d.1];
  d = D.1122;
  D.1123 = D.1122 + 1;
  t[d.1] = D.1123;
  D.1124 = t[1024];
  D.1125 = t[0];
  printf (&"%d %d %d\n"[0], d, D.1125, D.1124);
  D.1126 = 0;
  return D.1126;
}



$ gcc/xgcc -Bgcc -O2 pr14470.c -o a
pr14470.c: In function 'main':
pr14470.c:8: warning: incompatible implicit declaration of built-in function
'printf'

$ ./a
1024 1025 0

$ gcc/xgcc -Bgcc --version
xgcc (GCC) 4.0.0 20040917 (experimental)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

The postincrement is emitted correctly out of the gimplifier.

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


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


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

end of thread, other threads:[~2004-09-18 15:44 UTC | newest]

Thread overview: 54+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-07 22:13 [Bug c/14470] New: x86 optimizer error (?) lvoge at cs dot vu dot nl
2004-03-07 22:26 ` [Bug c/14470] " lvoge at cs dot vu dot nl
2004-03-07 22:36 ` bangerth at dealii dot org
2004-03-07 22:43 ` lvoge at cs dot vu dot nl
2004-03-07 22:56 ` giovannibajo at libero dot it
2004-03-07 23:12 ` falk at debian dot org
2004-03-07 23:19 ` lvoge at cs dot vu dot nl
2004-03-07 23:57 ` pinskia at gcc dot gnu dot org
2004-03-08  0:57 ` pinskia at gcc dot gnu dot org
2004-03-08  1:47 ` amodra at bigpond dot net dot au
2004-03-08  3:12 ` zack at gcc dot gnu dot org
2004-03-08  4:35 ` bangerth at dealii dot org
2004-03-08  5:05 ` giovannibajo at libero dot it
2004-03-08  5:30 ` zack at gcc dot gnu dot org
2004-03-08  9:13 ` [Bug optimization/14470] [3.4/3.5 regression] trouble with post-increment reichelt at gcc dot gnu dot org
2004-03-08  9:17 ` [Bug optimization/14470] [3.3/3.4/3.5 " reichelt at gcc dot gnu dot org
2004-03-08  9:37 ` ebotcazou at gcc dot gnu dot org
2004-03-08 10:13 ` jsm at polyomino dot org dot uk
2004-03-11  6:34 ` [Bug middle-end/14470] " ebotcazou at gcc dot gnu dot org
2004-03-13  2:53 ` [Bug middle-end/14470] [3.4 " gdr at gcc dot gnu dot org
2004-03-13  3:03 ` cvs-commit at gcc dot gnu dot org
2004-03-13 16:20 ` [Bug middle-end/14470] [3.4/3.5 regression] [tree-ssa] " mmitchel at gcc dot gnu dot org
2004-03-13 18:16 ` cvs-commit at gcc dot gnu dot org
2004-03-13 18:26 ` [Bug middle-end/14470] [3.4 " pinskia at gcc dot gnu dot org
2004-03-13 18:26 ` cvs-commit at gcc dot gnu dot org
2004-03-13 18:29 ` [Bug middle-end/14470] " pinskia at gcc dot gnu dot org
2004-03-13 18:32 ` cvs-commit at gcc dot gnu dot org
2004-03-13 18:42 ` ebotcazou at gcc dot gnu dot org
2004-03-13 18:52 ` pinskia at gcc dot gnu dot org
2004-03-13 19:01 ` ebotcazou at gcc dot gnu dot org
2004-03-19 15:56 ` rearnsha at gcc dot gnu dot org
2004-03-19 17:04 ` mmitchel at gcc dot gnu dot org
2004-03-19 17:07 ` rearnsha at arm dot com
2004-03-19 17:09 ` richard dot earnshaw at arm dot com
2004-03-19 17:59 ` ebotcazou at gcc dot gnu dot org
2004-03-19 17:59 ` ebotcazou at gcc dot gnu dot org
2004-03-19 23:26 ` ebotcazou at gcc dot gnu dot org
2004-03-20 13:40 ` ebotcazou at gcc dot gnu dot org
2004-03-21 19:26 ` mmitchel at gcc dot gnu dot org
2004-03-22 11:59 ` cvs-commit at gcc dot gnu dot org
2004-03-22 12:09 ` cvs-commit at gcc dot gnu dot org
2004-03-22 16:31 ` ebotcazou at gcc dot gnu dot org
2004-03-22 18:40 ` cvs-commit at gcc dot gnu dot org
2004-05-01  1:38 ` dnovillo at gcc dot gnu dot org
2004-05-03 14:42 ` dnovillo at gcc dot gnu dot org
2004-05-03 15:05 ` bangerth at dealii dot org
2004-05-03 15:09 ` dnovillo at redhat dot com
2004-05-03 15:12 ` reichelt at gcc dot gnu dot org
2004-05-03 15:13 ` reichelt at gcc dot gnu dot org
2004-05-03 15:31 ` bangerth at dealii dot org
2004-05-13 21:52 ` [Bug tree-optimization/14470] " pinskia at gcc dot gnu dot org
2004-09-14 22:58 ` dnovillo at gcc dot gnu dot org
2004-09-17  3:53 ` pinskia at gcc dot gnu dot org
2004-09-18 15:44 ` dnovillo 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).