public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/37990]  New: -Os produces redundant instructions
@ 2008-11-01 21:26 reza at parvan dot net
  2008-11-02 10:34 ` [Bug c/37990] " rguenth at gcc dot gnu dot org
  2008-11-02 11:03 ` reza at parvan dot net
  0 siblings, 2 replies; 3+ messages in thread
From: reza at parvan dot net @ 2008-11-01 21:26 UTC (permalink / raw)
  To: gcc-bugs

DESCRIPTION:
----------------------------------------
Simple test case is below.
There is redundant stack manipulation in the assembly output.
Use gcc -Wall -Os -S test.c
-----------------------------------------

VERSION INFO:
----------------------------------
gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-mpfr --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)
-----------------------------------

SOURCE CODE:
----------------------------------
extern int ii(int i);

void 
mm()
{
    int i=99;
more:
    i = ii(i);
    goto inc;
inc:
    if(i==0)
        goto more;
    i++;
    goto more;
}
---------------------------------------


-- 
           Summary: -Os produces redundant instructions
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reza at parvan dot net


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


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

end of thread, other threads:[~2008-11-02 11:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-01 21:26 [Bug c/37990] New: -Os produces redundant instructions reza at parvan dot net
2008-11-02 10:34 ` [Bug c/37990] " rguenth at gcc dot gnu dot org
2008-11-02 11:03 ` reza at parvan dot net

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).