public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/17416] New: stack variable merging doesn't work
@ 2004-09-11  8:00 ak at muc dot de
  2004-09-11  8:01 ` [Bug middle-end/17416] " ak at muc dot de
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: ak at muc dot de @ 2004-09-11  8:00 UTC (permalink / raw)
  To: gcc-bugs

I tried a simple test of the new stack merging functionality in mainline
and it refused to merge variables in differenct scopes.

e.g. the attached example generates with -O2:


f:
.LFB2:
        subq    $232, %rsp

I would have expected a stack frame size around 100

-- 
           Summary: stack variable merging doesn't work
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ak at muc dot de
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: x86_64-linux
  GCC host triplet: x86_64-linux
GCC target triplet: x86_64-linux


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


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

* [Bug middle-end/17416] stack variable merging doesn't work
  2004-09-11  8:00 [Bug middle-end/17416] New: stack variable merging doesn't work ak at muc dot de
@ 2004-09-11  8:01 ` ak at muc dot de
  2004-09-11 10:28 ` belyshev at lubercy dot com
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ak at muc dot de @ 2004-09-11  8:01 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ak at muc dot de  2004-09-11 08:01 -------
Created an attachment (id=7095)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7095&action=view)
test program for stack variable merging


Simple program with two local arrays in different scopes in the same function.
The arrays should be merged.


-- 


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


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

* [Bug middle-end/17416] stack variable merging doesn't work
  2004-09-11  8:00 [Bug middle-end/17416] New: stack variable merging doesn't work ak at muc dot de
  2004-09-11  8:01 ` [Bug middle-end/17416] " ak at muc dot de
@ 2004-09-11 10:28 ` belyshev at lubercy dot com
  2004-09-11 12:58 ` giovannibajo at libero dot it
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: belyshev at lubercy dot com @ 2004-09-11 10:28 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  GCC build triplet|x86_64-linux                |
   GCC host triplet|x86_64-linux                |
 GCC target triplet|x86_64-linux                |


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


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

* [Bug middle-end/17416] stack variable merging doesn't work
  2004-09-11  8:00 [Bug middle-end/17416] New: stack variable merging doesn't work ak at muc dot de
  2004-09-11  8:01 ` [Bug middle-end/17416] " ak at muc dot de
  2004-09-11 10:28 ` belyshev at lubercy dot com
@ 2004-09-11 12:58 ` giovannibajo at libero dot it
  2004-09-11 13:00 ` giovannibajo at libero dot it
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: giovannibajo at libero dot it @ 2004-09-11 12:58 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-09-11 12:58 -------
I cannot reproduce this on x86, not even at -O0:

./xgcc -B. -c -S -fomit-frame-pointer 17416.c
cat 17416.s

[...]
f:
        subl    $124, %esp
[...]
       .ident  "GCC: (GNU) 3.5.0 20040901 (experimental)"


Maybe it x86-64 specific?


-- 


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


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

* [Bug middle-end/17416] stack variable merging doesn't work
  2004-09-11  8:00 [Bug middle-end/17416] New: stack variable merging doesn't work ak at muc dot de
                   ` (2 preceding siblings ...)
  2004-09-11 12:58 ` giovannibajo at libero dot it
@ 2004-09-11 13:00 ` giovannibajo at libero dot it
  2004-09-11 13:01 ` giovannibajo at libero dot it
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: giovannibajo at libero dot it @ 2004-09-11 13:00 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |giovannibajo at libero dot
                   |                            |it


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


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

* [Bug middle-end/17416] stack variable merging doesn't work
  2004-09-11  8:00 [Bug middle-end/17416] New: stack variable merging doesn't work ak at muc dot de
                   ` (3 preceding siblings ...)
  2004-09-11 13:00 ` giovannibajo at libero dot it
@ 2004-09-11 13:01 ` giovannibajo at libero dot it
  2004-09-11 13:21 ` ak at muc dot de
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: giovannibajo at libero dot it @ 2004-09-11 13:01 UTC (permalink / raw)
  To: gcc-bugs



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


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


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

* [Bug middle-end/17416] stack variable merging doesn't work
  2004-09-11  8:00 [Bug middle-end/17416] New: stack variable merging doesn't work ak at muc dot de
                   ` (4 preceding siblings ...)
  2004-09-11 13:01 ` giovannibajo at libero dot it
@ 2004-09-11 13:21 ` ak at muc dot de
  2004-09-11 17:26 ` rth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ak at muc dot de @ 2004-09-11 13:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ak at muc dot de  2004-09-11 13:21 -------
Some additional information:

with -m32 on the x86-64 compiler I get 218 bytes stack frame
With a pure i386 compiler I get 216 bytes.



-- 


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


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

* [Bug middle-end/17416] stack variable merging doesn't work
  2004-09-11  8:00 [Bug middle-end/17416] New: stack variable merging doesn't work ak at muc dot de
                   ` (5 preceding siblings ...)
  2004-09-11 13:21 ` ak at muc dot de
@ 2004-09-11 17:26 ` rth at gcc dot gnu dot org
  2004-09-11 20:07 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rth at gcc dot gnu dot org @ 2004-09-11 17:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rth at gcc dot gnu dot org  2004-09-11 17:26 -------
Guh, looks like off-by-one buglet.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|rth at gcc dot gnu dot org  |
         AssignedTo|unassigned at gcc dot gnu   |rth at gcc dot gnu dot org
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-09-11 17:26:50
               date|                            |


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


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

* [Bug middle-end/17416] stack variable merging doesn't work
  2004-09-11  8:00 [Bug middle-end/17416] New: stack variable merging doesn't work ak at muc dot de
                   ` (6 preceding siblings ...)
  2004-09-11 17:26 ` rth at gcc dot gnu dot org
@ 2004-09-11 20:07 ` cvs-commit at gcc dot gnu dot org
  2004-09-11 20:12 ` rth at gcc dot gnu dot org
  2004-11-06 15:42 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-09-11 20:07 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-09-11 20:07 -------
Subject: Bug 17416

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	rth@gcc.gnu.org	2004-09-11 20:07:12

Modified files:
	gcc            : ChangeLog cfgexpand.c 

Log message:
	PR middle-end/17416
	* cfgexpand.c (expand_used_vars_for_block): Fix off-by-one bug
	in conflict loop.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.5398&r2=2.5399
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cfgexpand.c.diff?cvsroot=gcc&r1=2.22&r2=2.23



-- 


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


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

* [Bug middle-end/17416] stack variable merging doesn't work
  2004-09-11  8:00 [Bug middle-end/17416] New: stack variable merging doesn't work ak at muc dot de
                   ` (7 preceding siblings ...)
  2004-09-11 20:07 ` cvs-commit at gcc dot gnu dot org
@ 2004-09-11 20:12 ` rth at gcc dot gnu dot org
  2004-11-06 15:42 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: rth at gcc dot gnu dot org @ 2004-09-11 20:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rth at gcc dot gnu dot org  2004-09-11 20:12 -------
Fixed.

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


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


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

* [Bug middle-end/17416] stack variable merging doesn't work
  2004-09-11  8:00 [Bug middle-end/17416] New: stack variable merging doesn't work ak at muc dot de
                   ` (8 preceding siblings ...)
  2004-09-11 20:12 ` rth at gcc dot gnu dot org
@ 2004-11-06 15:42 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-06 15:42 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.0.0


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


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

end of thread, other threads:[~2004-11-06 15:42 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-11  8:00 [Bug middle-end/17416] New: stack variable merging doesn't work ak at muc dot de
2004-09-11  8:01 ` [Bug middle-end/17416] " ak at muc dot de
2004-09-11 10:28 ` belyshev at lubercy dot com
2004-09-11 12:58 ` giovannibajo at libero dot it
2004-09-11 13:00 ` giovannibajo at libero dot it
2004-09-11 13:01 ` giovannibajo at libero dot it
2004-09-11 13:21 ` ak at muc dot de
2004-09-11 17:26 ` rth at gcc dot gnu dot org
2004-09-11 20:07 ` cvs-commit at gcc dot gnu dot org
2004-09-11 20:12 ` rth at gcc dot gnu dot org
2004-11-06 15:42 ` pinskia 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).