public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/21529] New: code size regression (+40%) with -Os from GCC-3.4.3 to 4.1
@ 2005-05-12  9:42 etienne_lorrain at yahoo dot fr
  2005-05-12 10:39 ` [Bug c/21529] " steven at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: etienne_lorrain at yahoo dot fr @ 2005-05-12  9:42 UTC (permalink / raw)
  To: gcc-bugs

Compiling this code with -Os is more than 40 % bigger in size with GCC-4.1
compared to GCC-3.4.3.
See also thread: http://gcc.gnu.org/ml/gcc/2005-05/msg00532.html
>>>>
struct disk_interface_str {
    unsigned    nb_IDE_found;
    struct IDE_found_str {
        unsigned short  ideIOadr;
        unsigned short  ideIOctrladr;
        unsigned char   irq;
        unsigned char   bios_order;
        unsigned short  reserved;
        } *IDE_found;
    } DI;

void reorder_IDE_for_linux (void)
  {
  static const unsigned short idearray[] = {
        0x1F0, 0x170,
        0x1E8, 0x168,
        0x1E0, 0x160,
        };
  unsigned short cpt, order;

  for (order = 0; order < sizeof(idearray)/sizeof(idearray[0]); order++) {
      for (cpt = order + 1; cpt < DI.nb_IDE_found; cpt++)
          if (DI.IDE_found[cpt].ideIOadr == idearray[order])
              break;
      if (cpt < DI.nb_IDE_found) {
          struct IDE_found_str save = DI.IDE_found[cpt];
          unsigned short i;

          for (i = order; i < cpt; i++) {
              struct IDE_found_str tmp = DI.IDE_found[i];
              DI.IDE_found[i] = save;
              save = tmp;
              }
          DI.IDE_found[cpt] = save;
          }
      }
  }
<<<<

-- 
           Summary: code size regression (+40%) with -Os from GCC-3.4.3 to
                    4.1
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: etienne_lorrain at yahoo dot fr
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i486-pc-linux-gnu
  GCC host triplet: i486-pc-linux-gnu
GCC target triplet: i486-pc-linux-gnu


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


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

end of thread, other threads:[~2005-08-05 20:39 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-12  9:42 [Bug c/21529] New: code size regression (+40%) with -Os from GCC-3.4.3 to 4.1 etienne_lorrain at yahoo dot fr
2005-05-12 10:39 ` [Bug c/21529] " steven at gcc dot gnu dot org
2005-05-12 11:48 ` giovannibajo at libero dot it
2005-05-12 13:41 ` [Bug middle-end/21529] [4.0/4.1 Regression] " giovannibajo at libero dot it
2005-05-20 15:49 ` giovannibajo at libero dot it
2005-05-20 15:50 ` giovannibajo at libero dot it
2005-07-08  1:38 ` mmitchel at gcc dot gnu dot org
2005-08-04 22:54 ` rth at gcc dot gnu dot org
2005-08-05  2:42 ` cvs-commit at gcc dot gnu dot org
2005-08-05 20:39 ` rth at gcc dot gnu dot org
2005-08-05 20:39 ` cvs-commit 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).