From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7222 invoked by alias); 12 May 2005 09:42:24 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 6939 invoked by uid 48); 12 May 2005 09:42:01 -0000 Date: Thu, 12 May 2005 09:42:00 -0000 From: "etienne_lorrain at yahoo dot fr" To: gcc-bugs@gcc.gnu.org Message-ID: <20050512094159.21529.etienne_lorrain@yahoo.fr> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c/21529] New: code size regression (+40%) with -Os from GCC-3.4.3 to 4.1 X-Bugzilla-Reason: CC X-SW-Source: 2005-05/txt/msg01647.txt.bz2 List-Id: 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