From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1129 invoked by alias); 21 Nov 2001 15:16:05 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 1082 invoked by uid 71); 21 Nov 2001 15:16:02 -0000 Resent-Date: 21 Nov 2001 15:16:01 -0000 Resent-Message-ID: <20011121151601.1081.qmail@sourceware.cygnus.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org, mh@openoffice.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, er@openoffice.org Received:(qmail 655 invoked by uid 61); 21 Nov 2001 15:13:49 -0000 Message-Id:<20011121151349.654.qmail@sourceware.cygnus.com> Date: Fri, 16 Nov 2001 23:45:00 -0000 From: er@openoffice.org Reply-To: er@openoffice.org To: gcc-gnats@gcc.gnu.org Cc: mh@openoffice.org X-Send-Pr-Version:gnatsweb-2.9.2 (1.1.1.1.2.21) X-GNATS-Notify:mh@openoffice.org Subject: optimization/4921: gcc-3.0.1 and 3.0.2 generate wrong code with -O2 X-SW-Source: 2001-11/txt/msg00432.txt.bz2 List-Id: >Number: 4921 >Category: optimization >Synopsis: gcc-3.0.1 and 3.0.2 generate wrong code with -O2 >Confidential: no >Severity: serious >Priority: high >Responsible: unassigned >State: open >Class: wrong-code >Submitter-Id: net >Arrival-Date: Wed Nov 21 07:16:01 PST 2001 >Closed-Date: >Last-Modified: >Originator: er@openoffice.org >Release: gcc-3.0.1 >Organization: >Environment: Linux x86 (SuSE 7.3 - Kernel 2.4.10-4GB) >Description: The assembler code generated only partly initializes the ScRange object. The Row constants (43 and 46) are written to the ScAddress locations after the ScRange object is constructed with the ScAddress objects. I set this to high priority because we have quite a few optimization problems in our build of OpenOffice.org with gcc3 (problems we didn't have with 2.95.3) and are now forced to use -O1 instead of -O2 to get rid of them which of course has great impact on code size and speed. g++ -v output: Reading specs from /develop6/update/dev/gcc_3.0.1_linux_libc2.11/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/specs Configured with: ./configure --prefix=/develop6/update/dev/gcc_3.0.1_linux_libc2.11 --with-gnu-as --with-as-pathname=/develop6/update/dev/gcc_3.0.1_linux_libc2.11/bin/as --with-gnu-ld --with-ld-pathname=/develop6/update/dev/gcc_3.0.1_linux_libc2.11/bin/ld --enable-languages=c++ --enable-threads Thread model: posix gcc version 3.0.1 /develop6/update/dev/gcc_3.0.1_linux_libc2.11/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/cpp0 -lang-c++ -D__GNUG__=3 -D__GXX_DEPRECATED -D__EXCEPTIONS -D__GXX_ABI_VERSION=100 -v -D__GNUC__=3 -D__GNUC_MINOR__=0 -D__GNUC_PATCHLEVEL__=1 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__OPTIMIZE__ -D__STDC_HOSTED__=1 -Wall -D_GNU_SOURCE -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ gcc3bug.cxx gcc3bug.ii GNU CPP version 3.0.1 (cpplib) (i386 Linux/ELF) ignoring nonexistent directory "/develop6/update/dev/gcc_3.0.1_linux_libc2.11/i686-pc-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /develop6/update/dev/gcc_3.0.1_linux_libc2.11/include/g++-v3 /develop6/update/dev/gcc_3.0.1_linux_libc2.11/include/g++-v3/i686-pc-linux-gnu /develop6/update/dev/gcc_3.0.1_linux_libc2.11/include/g++-v3/backward /usr/local/include /develop6/update/dev/gcc_3.0.1_linux_libc2.11/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/include /usr/include End of search list. /develop6/update/dev/gcc_3.0.1_linux_libc2.11/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/cc1plus -fpreprocessed gcc3bug.ii -quiet -dumpbase gcc3bug.cxx -O2 -Wall -version -o gcc3bug.s GNU CPP version 3.0.1 (cpplib) (i386 Linux/ELF) GNU C++ version 3.0.1 (i686-pc-linux-gnu) compiled by GNU C version 3.0.1. /develop6/update/dev/gcc_3.0.1_linux_libc2.11/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/../../../../i686-pc-linux-gnu/bin/as -V -Qy -o gcc3bug.o gcc3bug.s GNU assembler version 2.11.2 (i686-pc-linux-gnu) using BFD version 2.11.2 /develop6/update/dev/gcc_3.0.1_linux_libc2.11/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/collect2 -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 /usr/lib/crt1.o /usr/lib/crti.o /develop6/update/dev/gcc_3.0.1_linux_libc2.11/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/crtbegin.o -L/develop6/update/dev/gcc_3.0.1_linux_libc2.11/lib/gcc-lib/i686-pc-linux-gnu/3.0.1 -L/develop6/update/dev/gcc_3.0.1_linux_libc2.11/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/../../../../i686-pc-linux-gnu/lib -L/develop6/update/dev/gcc_3.0.1_linux_libc2.11/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/../../.. gcc3bug.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /develop6/update/dev/gcc_3.0.1_linux_libc2.11/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/crtend.o /usr/lib/crtn.o >How-To-Repeat: Compile attached gcc3bug.ii with -O2 and run program. a1,a2 and the members of a3 are not identical. >Fix: compile with -O1 >Release-Note: >Audit-Trail: >Unformatted: