[Bug other/29524] Too much RAM used: __clz_tab[] linked

2006-11-07 Thread batt at develer dot com


--- Comment #5 from batt at develer dot com  2006-11-07 11:10 ---
Here's the testcase:

==
int main(int argc, char *argv[])
{
   float O1 = argc;
   float V1 = argc+2;

   int ret = O1 * V1;
   return ret;
}
==

[EMAIL PROTECTED]:~/src$ /usr/local/avr-3.4.4-install/bin/avr-gcc -Os
-Wl,-Map=bug29524.map,--cref bug29524.c  grep -P 0x0.*__clz bug29524.map

[EMAIL PROTECTED]:~/src$ /usr/local/avr-4.1.1-batt/bin/avr-gcc -Os
-Wl,-Map=bug29524.map,--cref bug29524.c  grep -P 0x0.*__clz bug29524.map

[EMAIL PROTECTED]:~/src$ /usr/local/avr-4.2-20061014-install/bin/avr-gcc -Os
-Wl,-Map=bug29524.map,--cref bug29524.c  grep -P 0x0.*__clz bug29524.map
0x0434__clzsi2
0x00800068__clz_tab


These are the three compilers:

[EMAIL PROTECTED]:~/src$ /usr/local/avr-3.4.4-install/bin/avr-gcc -v
Reading specs from /usr/local/avr-3.4.4-install/bin/../lib/gcc/avr/3.4.4/specs
Configured with: ../configure --prefix=/usr/local/avr-3.4.4-install/
--target=avr --enable-languages=c,c++ --enable-multilib --with-dwarf2
--disable-libmudflap --enable-target-optspace --enable-threads=single
--with-gnu-ld --enable-install-libbfd --disable-werror --disable-gdbtk
--disable-libmudflap --disable-nls --disable-__cxa_atexit --disable-clocale
--disable-c-mbchar --disable-long-long --without-newlib
Thread model: single
gcc version 3.4.4

[EMAIL PROTECTED]:~/src$ /usr/local/avr-4.1.1-batt/bin/avr-gcc -v
Using built-in specs.
Target: avr
Configured with: ../configure --prefix=/usr/local/avr --target=avr
--enable-languages=c,c++ --disable-nls --disable-libssp --with-dwarf2 :
(reconfigured) ../configure --prefix=/usr/local/avr --target=avr --disable-nls
--disable-libssp --with-dwarf2 --enable-languages=c,c++ --no-create
--no-recursion
Thread model: single
gcc version 4.1.2 20061030 (prerelease)-batt-avr1281

[EMAIL PROTECTED]:~/src$ /usr/local/avr-4.2-20061014-install/bin/avr-gcc -v
Using built-in specs.
Target: avr
Configured with: ../configure --prefix=/usr/local/avr --target=avr
--enable-languages=c,c++ --disable-nls --disable-libssp --with-dwarf2
Thread model: single
gcc version 4.2.0 20061014 (experimental)


As you can see, the clz_tab is linked in only with the SVN version of 4.2, and
it's not linked in with 4.1.1. I also used -Os (which is the compiler switch I
care about).


-- 

batt at develer dot com changed:

   What|Removed |Added

 Status|WAITING |NEW


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



[Bug other/29524] Too much RAM used: __clz_tab[] linked

2006-10-23 Thread batt at develer dot com


--- Comment #4 from batt at develer dot com  2006-10-23 19:09 ---
I have 3 projects involving gcc and avr, and all of these have an increased RAM
usage due to __clz_tab linking after switching from gcc 4.1.1 to 4.2.
I will try as soon as possible to find a suitable testcase.


-- 


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



[Bug c/29524] New: Too much RAM used: __clz_tab[] linked

2006-10-20 Thread batt at develer dot com
I noticed that the amount of RAM used, compared to the code generated by gcc
4.1.1, is increased by 256 bytes and found that this it's due to the __clz_tab
array linked in at RAM start.


-- 
   Summary: Too much RAM used: __clz_tab[] linked
   Product: gcc
   Version: 4.2.0
Status: UNCONFIRMED
  Severity: major
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: batt at develer dot com
 GCC build triplet: 20061014
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: avr-*-*


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