From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5231 invoked by alias); 17 Jul 2002 10:16:03 -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 5210 invoked by uid 71); 17 Jul 2002 10:16:03 -0000 Resent-Date: 17 Jul 2002 10:16:03 -0000 Resent-Message-ID: <20020717101603.5209.qmail@sources.redhat.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 Resent-Reply-To: gcc-gnats@gcc.gnu.org, velco@fadata.bg Received: (qmail 2307 invoked from network); 17 Jul 2002 10:10:25 -0000 Received: from unknown (HELO fadata.bg) (80.72.64.67) by sources.redhat.com with SMTP; 17 Jul 2002 10:10:25 -0000 Received: (qmail 2955 invoked by uid 1000); 17 Jul 2002 10:10:22 -0000 Message-Id: <20020717101022.2937.qmail@fadata.bg> Date: Wed, 17 Jul 2002 03:16:00 -0000 From: velco@fadata.bg To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: 3.113 Subject: target/7336: Incorrect frame pointer elimination X-SW-Source: 2002-07/txt/msg00507.txt.bz2 List-Id: >Number: 7336 >Category: target >Synopsis: With -Os option, gcc incorrectly computes the elimination offset >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: wrong-code >Submitter-Id: net >Arrival-Date: Wed Jul 17 03:16:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Momchil Velikov >Release: 3.1.1 20020717 (prerelease) >Organization: >Environment: System: Linux freon 2.4.18 #1 SMP Tue May 14 21:08:03 EEST 2002 i686 unknown Architecture: i686 host: i686-pc-linux-gnu build: i686-pc-linux-gnu target: arm-unknown-elf configured with: /home/velco/src/gcc-3.1.1-pristine/configure --prefix=/home/velco/sim --target=arm-elf --enable-languages=c --with-cpu=arm7tdmi >Description: The function ``arm_compute_initial_elimination_offset'' computes incorrect offset in certain cases where the ``-Os'' option is given. It fails to account for a link register save, thus results differ from the ones computed by ``arm_compute_save_reg_mask''. >How-To-Repeat: Compile the following testcase with -Os, e.g. arm-elf-gcc -Os pt.c -o pt struct pt { int x; int y; }; int foo (p0, p1, p2) struct pt p0, p1, p2; { if ( p0.x != 0 || p0.y != 1 || p1.x != 2 || p1.y != 3 || p2.x != 4 || p2.y != 5 ) return -1; else return 0; } int main() { struct pt p0, p1, p2; p0.x = 0; p0.y = 1; p1.x = 2; p1.y = 3; p2.x = 4; p2.y = 5; if (foo (p0, p1, p2)) abort(); return 0; } >Fix: Patch is sent to gcc-patches: http://gcc.gnu.org/ml/gcc-patches/2002-07/msg00448.html >Release-Note: >Audit-Trail: >Unformatted: