First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 21141
Product:  
Component:  
Status: RESOLVED
Resolution: WONTFIX
Assigned To: Not yet assigned to anyone <unassigned@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: vda@port.imtp.ilyichevsk.odessa.ua
Add CC:
CC:
Remove selected CCs
Build:
URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
t.c testcase text/plain 2005-04-21 06:08 1.15 KB Edit
t.c testcase without use of uninitialized data text/plain 2005-04-21 11:24 1.27 KB Edit
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 21141 depends on: Show dependency tree
Show dependency graph
Bug 21141 blocks: 17838

Additional Comments:






View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: 2006-01-07 01:54 Opened: 2005-04-21 06:05
# gcc -v
Reading specs from
/.share/usr/app/gcc-3.4.3/bin/../lib/gcc/i386-pc-linux-gnu/3.4.3/specs
Configured with: ../gcc-3.4.3/configure --prefix=/usr/app/gcc-3.4.3
--exec-prefix=/usr/app/gcc-3.4.3 --bindir=/usr/bin --sbindir=/usr/sbin
--libexecdir=/usr/app/gcc-3.4.3/libexec --datadir=/usr/app/gcc-3.4.3/share
--sysconfdir=/etc --sharedstatedir=/usr/app/gcc-3.4.3/var/com
--localstatedir=/usr/app/gcc-3.4.3/var --libdir=/usr/lib
--includedir=/usr/include --infodir=/usr/info --mandir=/usr/man
--with-slibdir=/usr/app/gcc-3.4.3/lib --with-local-prefix=/usr/local
--with-gxx-include-dir=/usr/app/gcc-3.4.3/include/g++-v3
--enable-languages=c,c++ --with-system-zlib --disable-nls --enable-threads=posix
i386-pc-linux-gnu
Thread model: posix
gcc version 3.4.3

Does not happen with -Os
Does not happen with 3.4.1

I have a testcase

------- Comment #1 From vda@port.imtp.ilyichevsk.odessa.ua 2005-04-21 06:08 -------
Created an attachment (id=8695) [edit]
testcase

Use gcc -O2 -S t.c

------- Comment #2 From Andrew Pinski 2005-04-21 06:18 -------
4.1.0/4.0.0 gives:
        subl    $268, %esp
 which is better than 3.4.x.
3.4.0 gives:
        subl    $732, %esp

Only a 3.4 regression, confirmed:
        subl    $3516, %esp

------- Comment #3 From Andrew Pinski 2005-04-21 06:27 -------
Note your testcase has uninitialized variables, well the arrays are
uninitizalized, after fixing them, it 
gets worse:
        subl    $3532, %esp
Though on 4.0.0/4.1.0, we get better:
        subl    $260, %esp
which is funny but what ever.
3.3.3 by the way gives:
        subl    $636, %esp
3.4.0 gives:
        subl    $748, %esp
3.2.3:
        subl    $444, %esp
3.0.4:
        subl    $556, %esp
2.95.3:
        subl $508,%esp

so 4.0.0/4.1.0 gices the best results.

------- Comment #4 From Andrew Pinski 2005-04-21 06:33 -------
Hmm, with -fomit-frame-pointer, the stack usage goes back to an okay value:
        subl    $604, %esp


I think this is just another case where spills are no not reused, see PR 17838. so -fomit-frame-pointer 
causes the spilling to go down. 4.0.0 reduces the stack usage by making the arrays really each 8 
variables.

------- Comment #5 From vda@port.imtp.ilyichevsk.odessa.ua 2005-04-21 11:24 -------
Created an attachment (id=8699) [edit]
testcase without use of uninitialized data

------- Comment #6 From vda@port.imtp.ilyichevsk.odessa.ua 2005-04-21 11:27 -------
>Though on 4.0.0/4.1.0, we get better:
>        subl    $260, %esp

It's way too good. Declared locals should take 512 bytes, plus
any temporaries for spills.

Please find fixed testcase. My fault.

------- Comment #7 From vda@port.imtp.ilyichevsk.odessa.ua 2005-04-21 11:29 -------
Whoops.... no, locals are 256 bytes only.
(/me is looking for some coffee)

------- Comment #8 From Gabriel Dos Reis 2006-02-28 10:14 -------
won't fix for 3.4.6

First Last Prev Next    No search results available      Search page      Enter new bug