This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

fortran/6138: Incorrect access of integer*1 variables on PA



>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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]