From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28320 invoked by alias); 2 Apr 2002 22:06:02 -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 28282 invoked by uid 71); 2 Apr 2002 22:06:01 -0000 Resent-Date: 2 Apr 2002 22:06:01 -0000 Resent-Message-ID: <20020402220601.28281.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, dave@hiauly1.hia.nrc.ca Received:(qmail 26064 invoked by uid 61); 2 Apr 2002 22:01:14 -0000 Message-Id:<20020402220114.26063.qmail@sources.redhat.com> Date: Tue, 02 Apr 2002 14:06:00 -0000 From: dave@hiauly1.hia.nrc.ca Reply-To: dave@hiauly1.hia.nrc.ca To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version:gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: fortran/6138: Incorrect access of integer*1 variables on PA X-SW-Source: 2002-04/txt/msg00122.txt.bz2 List-Id: >Number: 6138 >Category: fortran >Synopsis: Incorrect access of integer*1 variables on PA >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Tue Apr 02 14:06:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Dave Anglin >Release: gcc 3.1 (prerelease) and gcc 3.2 >Organization: >Environment: hppa-linux, hppa2.0w-hp-hpux11*, hppa1.1-hp-hpux10.20 >Description: Problem noted by examing f90-intrinsic-numeric.f FAIL. The following snippet from the above test shows the problem: j = -9 ja = 9 k = j ka = ja call c_i2(ABS(j),ja,'ABS(integer*2)') call c_i1(ABS(k),ka,'ABS(integer*1)') Incorrect code is generated for "ka" load. ldi 9,%r4 sth %r4,-120(%r30) ldb -117(%r30),%r19 The above assembly code shows the store generated for "ja" and load for "ja". The offset should be -119, not -117. This error is present in the initial rtl: (insn 45 33 34 (set (reg:QI 101) (mem/f:QI (plus:SI (reg/f:SI 90 virtual-stack-vars) (const_int 3 [0x3])) [0 S1 A8])) -1 (nil) (nil)) This occurs at -O1 and above. Looks like the g77 code assumes that the load is from an integer*4 variable rather than an integer*2 variable. >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: