From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8804 invoked by alias); 21 Oct 2002 11:26:04 -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 8783 invoked by uid 71); 21 Oct 2002 11:26:03 -0000 Resent-Date: 21 Oct 2002 11:26:03 -0000 Resent-Message-ID: <20021021112603.8782.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, tanaka@personal-media.co.jp Received: (qmail 8436 invoked by uid 61); 21 Oct 2002 11:24:41 -0000 Message-Id: <20021021112441.8435.qmail@sources.redhat.com> Date: Mon, 21 Oct 2002 04:26:00 -0000 From: tanaka@personal-media.co.jp Reply-To: tanaka@personal-media.co.jp To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c/8299: sh-gcc-3.2 Optimizing problem X-SW-Source: 2002-10/txt/msg00775.txt.bz2 List-Id: >Number: 8299 >Category: c >Synopsis: sh-gcc-3.2 Optimizing problem >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: wrong-code >Submitter-Id: net >Arrival-Date: Mon Oct 21 04:26:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Takayasu Tanaka >Release: gcc version 3.2 >Organization: >Environment: RedHat Linux 7.1 Configured with: ../gcc-3.2/configure --enable-languages=c,c++ --prefix=/home/tanaka/sh/bin --target=sh-unknown-elf >Description: On some condition, arguments of a function are stored in wrong position. >How-To-Repeat: ---------- source code ------------ typedef struct { int x; int y; } PNT; int g(int a1, int a2, int a3, int a4, int a5, int a6) { return 0; } int f(int a1, int a2, int a3, PNT p, int a6) { return g( a1, a2, a3, p.x, p.y, a6); } void _start() { int a1 = 1, a2 = 2, a3 = 3; PNT p = {4, 5}; int a6 = 6; f( a1, a2, a3, p, a6 ); } ------------------------------------ Argument of g() must be 1, 2, 3, 4, 5, 6. But, compiled with -O2, argument of g() is 1, 2, 3, 4, 6, 6. >Fix: >Release-Note: >Audit-Trail: >Unformatted: