[Bug target/48576] wrong code when accessing variables in a large stack frame

2018-02-11 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48576

Eric Gallager  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||egallager at gcc dot gnu.org
 Resolution|--- |FIXED

--- Comment #9 from Eric Gallager  ---
(In reply to Mikael Pettersson from comment #8)
> This got fixed for 4.9+ by Bernd Schmidt's "Fix for reloads_unique_chain_p"
> patch in r203596: https://gcc.gnu.org/ml/gcc-patches/2013-10/msg01041.html. 
> The patch submission describes a problem very similar to this one, so I'm
> fairly certain the fix is "proper".
> 
> The patch backports easily to 4.8 and 4.7 and fixes the bug there too.

OK, guess this can be closed as FIXED then.

[Bug target/48576] wrong code when accessing variables in a large stack frame

2014-05-18 Thread mikpelinux at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48576

--- Comment #8 from Mikael Pettersson mikpelinux at gmail dot com ---
This got fixed for 4.9+ by Bernd Schmidt's Fix for reloads_unique_chain_p
patch in r203596: https://gcc.gnu.org/ml/gcc-patches/2013-10/msg01041.html. 
The patch submission describes a problem very similar to this one, so I'm
fairly certain the fix is proper.

The patch backports easily to 4.8 and 4.7 and fixes the bug there too.


[Bug target/48576] wrong code when accessing variables in a large stack frame

2013-04-13 Thread mikpe at it dot uu.se


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



--- Comment #7 from Mikael Pettersson mikpe at it dot uu.se 2013-04-13 
12:26:24 UTC ---

This bug still occurs with gcc 4.9-20130407, 4.8-20130411, and 4.7-20130406.


[Bug target/48576] wrong code when accessing variables in a large stack frame

2011-04-20 Thread ramana at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48576

--- Comment #6 from Ramana Radhakrishnan ramana at gcc dot gnu.org 2011-04-20 
14:20:10 UTC ---
Can an RM reprioritize this one ? It smells of something higher than P3 since
this is a wrong code regression from 4.4 ? 

cheers
Ramana


[Bug target/48576] wrong code when accessing variables in a large stack frame

2011-04-16 Thread mikpe at it dot uu.se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48576

--- Comment #5 from Mikael Pettersson mikpe at it dot uu.se 2011-04-16 
19:28:54 UTC ---
It started with r146817:

Author: matz
Date: Sun Apr 26 19:35:04 2009
New Revision: 146817

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=146817
Log:
gcc/
Expand from SSA.
...

Diffing the assembly code from r146816 and r146817 shows the error:

--- pr48576.s-r146816   2011-04-16 21:06:24.0 +0200
+++ pr48576.s-r146817   2011-04-16 21:06:03.0 +0200
...
bl  my_realloc
sub r3, fp, #4096
-   str r0, [r3, #-44]
-   str r6, [r0, r5, asl #2]
-   cmp r4, #1
+   str r0, [r3, #-48]
+   ldr r3, [r3, #-44]
+   ldr r2, [r3, #-48]
+   str r4, [r2, r3, asl #2]
+   cmp r9, #1
ble .L16
...

We wish to save the return value of my_realloc() and immediately make a store
with it as an array base pointer and another value as index.  Starting with
r146817 both values are considered spilled and get reloaded.  Both reloads need
an intermediate pointer into the frame to reach their locations.  The reload of
the index value clobbers the intermediate frame pointer needed for the reload
of the array base, causing that reload to read an incorrect location.


[Bug target/48576] wrong code when accessing variables in a large stack frame

2011-04-13 Thread ramana at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48576

Ramana Radhakrishnan ramana at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||wrong-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011.04.13 10:45:15
 CC||ramana at gcc dot gnu.org
 Ever Confirmed|0   |1

--- Comment #4 from Ramana Radhakrishnan ramana at gcc dot gnu.org 2011-04-13 
10:45:15 UTC ---
Confirmed.


[Bug target/48576] wrong code when accessing variables in a large stack frame

2011-04-12 Thread siarhei.siamashka at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48576

Siarhei Siamashka siarhei.siamashka at gmail dot com changed:

   What|Removed |Added

 CC||siarhei.siamashka at gmail
   ||dot com

--- Comment #1 from Siarhei Siamashka siarhei.siamashka at gmail dot com 
2011-04-12 15:23:02 UTC ---
This reminds me about bug 41074 (apparently the same hard to trigger large
stack frame related issue).


[Bug target/48576] wrong code when accessing variables in a large stack frame

2011-04-12 Thread mikpe at it dot uu.se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48576

Mikael Pettersson mikpe at it dot uu.se changed:

   What|Removed |Added

 CC||mikpe at it dot uu.se

--- Comment #2 from Mikael Pettersson mikpe at it dot uu.se 2011-04-12 
19:28:30 UTC ---
On armv5tel-linux-gnueabi, gcc-4.3.5 and gcc-4.4.5 -march=armv5te -O1
-fno-omit-frame-pointer compile the test case into an a.out that prints xx
and exits 0. gcc-4.5.2/4.6.0/4.7 all generate an a.out that segfaults, dropping
-fno-omit-frame-pointer makes the a.out print xx and exit 0 again.


[Bug target/48576] wrong code when accessing variables in a large stack frame

2011-04-12 Thread mikpe at it dot uu.se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48576

--- Comment #3 from Mikael Pettersson mikpe at it dot uu.se 2011-04-12 
22:41:14 UTC ---
Created attachment 23969
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=23969
standalone and reduced test case

Succeeds with no output, or segfaults.

I'll try a bisection later.