public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: fortran/6138: Incorrect access of integer*1 variables on PA
@ 2002-04-06 12:26 John David Anglin
  0 siblings, 0 replies; 6+ messages in thread
From: John David Anglin @ 2002-04-06 12:26 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR fortran/6138; it has been noted by GNATS.

From: "John David Anglin" <dave@hiauly1.hia.nrc.ca>
To: toon@moene.indiv.nluug.nl (Toon Moene)
Cc: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org
Subject: Re: fortran/6138: Incorrect access of integer*1 variables on PA
Date: Sat, 6 Apr 2002 15:24:27 -0500 (EST)

 > Unfortunately, after half a day of fiddling, I'm not sure if the reason
 > this fails on HPPA is the same as the reason it fails on POWERPC.
 
 On the PA, I am fairly certain the problem is in the "conversion" from
 INTEGER*2 to INTEGER*1.
 
 > On the latter, even the following is incorrect:
 > 
 >       INTEGER*1 I
 >       I = -9
 >       PRINT*,I
 >       END
 > 
 > which prints 247 ;-)
 
 OK under hppa-linux.  What's the assembly code look like?  The problems
 still could be related.  I would guess the wrong location for I is being
 passed.
 
 > Welllllll, perhaps this means that this afternoon multiplied one problem
 > into two :-(
 
 Sorry.
 
 Dave
 -- 
 J. David Anglin                                  dave.anglin@nrc.ca
 National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: fortran/6138: Incorrect access of integer*1 variables on PA
@ 2002-04-22 12:34 mmitchel
  0 siblings, 0 replies; 6+ messages in thread
From: mmitchel @ 2002-04-22 12:34 UTC (permalink / raw)
  To: dave, gcc-bugs, gcc-prs, mmitchel

Synopsis: Incorrect access of integer*1 variables on PA

State-Changed-From-To: analyzed->closed
State-Changed-By: mmitchel
State-Changed-When: Mon Apr 22 12:34:20 2002
State-Changed-Why:
    Fixed in GCC 3.1.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6138


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: fortran/6138: Incorrect access of integer*1 variables on PA
@ 2002-04-21 11:17 mmitchel
  0 siblings, 0 replies; 6+ messages in thread
From: mmitchel @ 2002-04-21 11:17 UTC (permalink / raw)
  To: dave, gcc-bugs, gcc-prs, mmitchel, nobody

Synopsis: Incorrect access of integer*1 variables on PA

Responsible-Changed-From-To: unassigned->mmitchel
Responsible-Changed-By: mmitchel
Responsible-Changed-When: Sun Apr 21 11:17:10 2002
Responsible-Changed-Why:
    Investigating.
State-Changed-From-To: open->analyzed
State-Changed-By: mmitchel
State-Changed-When: Sun Apr 21 11:17:10 2002
State-Changed-Why:
    Confirmed as a regression.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6138


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: fortran/6138: Incorrect access of integer*1 variables on PA
@ 2002-04-07  5:06 Toon Moene
  0 siblings, 0 replies; 6+ messages in thread
From: Toon Moene @ 2002-04-07  5:06 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR fortran/6138; it has been noted by GNATS.

From: Toon Moene <toon@moene.indiv.nluug.nl>
To: John David Anglin <dave@hiauly1.hia.nrc.ca>
Cc: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org
Subject: Re: fortran/6138: Incorrect access of integer*1 variables on PA
Date: Sun, 07 Apr 2002 14:01:26 +0200

 John David Anglin wrote:
 
 > I wrote:
 
 > > On the latter, even the following is incorrect:
 > >
 > >       INTEGER*1 I
 > >       I = -9
 > >       PRINT*,I
 > >       END
 > >
 > > which prints 247 ;-)
 > 
 > OK under hppa-linux.  What's the assembly code look like?  The problems
 > still could be related.  I would guess the wrong location for I is being
 > passed.
 
 Unfortunately, it's not simple to pass files from the PowerBook to the
 machine I'm sending this from, so this might take some time ...
 
 -- 
 Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
 Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
 Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
 Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: fortran/6138: Incorrect access of integer*1 variables on PA
@ 2002-04-06 12:16 Toon Moene
  0 siblings, 0 replies; 6+ messages in thread
From: Toon Moene @ 2002-04-06 12:16 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR fortran/6138; it has been noted by GNATS.

From: Toon Moene <toon@moene.indiv.nluug.nl>
To: dave@hiauly1.hia.nrc.ca
Cc: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org
Subject: Re: fortran/6138: Incorrect access of integer*1 variables on PA
Date: Sat, 06 Apr 2002 21:26:15 +0200

 dave@hiauly1.hia.nrc.ca wrote:
 
 >       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)')
 
 I've worked on this today, because this test suite entry fails for
 powerpc-linux too.
 
 Unfortunately, after half a day of fiddling, I'm not sure if the reason
 this fails on HPPA is the same as the reason it fails on POWERPC.
 
 On the latter, even the following is incorrect:
 
       INTEGER*1 I
       I = -9
       PRINT*,I
       END
 
 which prints 247 ;-)
 
 So I thought, this must be a signed/unsigned "char" problem, no ?
 
 Well, AFAICS, the PA port is default-signed-char platform, so this
 analysis doesn't apply.
 
 Welllllll, perhaps this means that this afternoon multiplied one problem
 into two :-(
 
 -- 
 Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
 Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
 Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
 Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)


^ permalink raw reply	[flat|nested] 6+ messages in thread

* fortran/6138: Incorrect access of integer*1 variables on PA
@ 2002-04-02 14:06 dave
  0 siblings, 0 replies; 6+ messages in thread
From: dave @ 2002-04-02 14:06 UTC (permalink / raw)
  To: gcc-gnats


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-04-22 19:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-06 12:26 fortran/6138: Incorrect access of integer*1 variables on PA John David Anglin
  -- strict thread matches above, loose matches on Subject: below --
2002-04-22 12:34 mmitchel
2002-04-21 11:17 mmitchel
2002-04-07  5:06 Toon Moene
2002-04-06 12:16 Toon Moene
2002-04-02 14:06 dave

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).