public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/13623] New: gcc seems to be allocating more space than necessary.
@ 2004-01-09  0:35 anupamk at speakeasy dot net
  2004-01-09  0:53 ` [Bug target/13623] " ozabluda at yahoo dot com
  2004-01-09  2:44 ` pinskia at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: anupamk at speakeasy dot net @ 2004-01-09  0:35 UTC (permalink / raw)
  To: gcc-bugs

i have a simple test program:

typedef struct
{
 	int a,b,c,d;
 	int x[10];
} s;

void foo(void)
{ s x; }

which is compiled without any flags i.e. 'gcc -c foo.c' if i look at the
generated code, it looks like this:

 00000000 <foo>:
    0:   55                      push   %ebp
    1:   89 e5                   mov    %esp,%ebp
    3:   83 ec 48                sub    $0x48,%esp
    6:   c9                      leave  
    7:   c3                      ret    

which is 72 bytes ! where the structure size (as reported by sizeof) is 56 bytes
only.

thank you
kind regards
anupam

here is the output from gcc -v :

Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/specs
Configured with: /var/tmp/portage/gcc-3.2.3-r2/work/gcc-3.2.3/configure
--prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.2
--includedir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include
--datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2
--mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2/man
--infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2/info --enable-shared
--host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --with-system-zlib
--enable-languages=c,c++,f77,objc,java --enable-threads=posix --enable-long-long
--disable-checking --enable-cstdio=stdio --enable-clocale=generic
--enable-__cxa_atexit --enable-version-specific-runtime-libs
--with-gxx-include-dir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include/g++-v3
--with-local-prefix=/usr/local --enable-shared --enable-nls
--without-included-gettext
Thread model: posix
gcc version 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r2, propolice)
 /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/cc1 -lang-c -v -D__GNUC__=3
-D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=3 -D__GXX_ABI_VERSION=102 -D__ELF__
-Dunix -D__gnu_linux__ -Dlinux -D__ELF__ -D__unix__ -D__gnu_linux__ -D__linux__
-D__unix -D__linux -Asystem=posix -D__NO_INLINE__ -D__STDC_HOSTED__=1 -Acpu=i386
-Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__
ds.c -quiet -dumpbase ds.c -version -o /tmp/ccbdcwDA.s
GNU CPP version 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r2, propolice) (cpplib)
(i386 Linux/ELF)
GNU C version 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r2, propolice)
(i686-pc-linux-gnu)
        compiled by GNU C version 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r2,
propolice).

-- 
           Summary: gcc seems to be allocating more space than necessary.
           Product: gcc
           Version: 3.2.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: anupamk at speakeasy dot net
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: gcc version 3.2.3 20030422
  GCC host triplet: i686 Intel(R) Pentium(R) 4 CPU
GCC target triplet: x86 intel


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


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

* [Bug target/13623] gcc seems to be allocating more space than necessary.
  2004-01-09  0:35 [Bug target/13623] New: gcc seems to be allocating more space than necessary anupamk at speakeasy dot net
@ 2004-01-09  0:53 ` ozabluda at yahoo dot com
  2004-01-09  2:44 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: ozabluda at yahoo dot com @ 2004-01-09  0:53 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ozabluda at yahoo dot com


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


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

* [Bug target/13623] gcc seems to be allocating more space than necessary.
  2004-01-09  0:35 [Bug target/13623] New: gcc seems to be allocating more space than necessary anupamk at speakeasy dot net
  2004-01-09  0:53 ` [Bug target/13623] " ozabluda at yahoo dot com
@ 2004-01-09  2:44 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-09  2:44 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-01-09 02:44 -------
This is a dup of bug 9624.

*** This bug has been marked as a duplicate of 9624 ***

*** This bug has been marked as a duplicate of 9624 ***

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


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


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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-09  0:35 [Bug target/13623] New: gcc seems to be allocating more space than necessary anupamk at speakeasy dot net
2004-01-09  0:53 ` [Bug target/13623] " ozabluda at yahoo dot com
2004-01-09  2:44 ` 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).