public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: fortran/3743: Reference to intrinsic `ISHFT' invalid
@ 2002-01-22 22:16 Billinghurst, David (CRTS)
0 siblings, 0 replies; 6+ messages in thread
From: Billinghurst, David (CRTS) @ 2002-01-22 22:16 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR fortran/3743; it has been noted by GNATS.
From: "Billinghurst, David (CRTS)" <David.Billinghurst@riotinto.com>
To: <gcc-gnats@gcc.gnu.org>
Cc:
Subject: Re: fortran/3743: Reference to intrinsic `ISHFT' invalid
Date: Wed, 23 Jan 2002 14:12:16 +0800
-----Original Message-----
From: David Edelsohn [mailto:dje@watson.ibm.com]
Sent: Tuesday, 1 January 2002 7:09=20
To: Billinghurst, David (CRTS); Toon Moene
Cc: gcc-patches@gcc.gnu.org
Subject: Re: Testcase for fortran/PR3743 "Reference to intrinsic `ISHFT'
invalid".
I tracked down the underlying cause of the failure, but the cause
is a fundamental design flaw in g77.
The symptom is intrin.c:ffeintrin_is_intrinsic() returns FALSE for
some Fortran intrinsics. Intrinsics are checked using bsearch() on the
array of intrinsics in intrin.def. The names are compared in the case
determined by ffe_case_intrin() which is initialized to=20
FFETARGET_defaultCASE_INTRIN in top.c, using the default value
FFE_caseLOWER in target.h.
bsearch() requires a sorted array. The failing testcase,
BIT_SIZE, includes an underscore in the name. Underscore is collated
between uppercase letter and lowercase letters. intrin.def is sorted =
for
uppercase names.
DEFNAME ("BITEST", "bitest", "BITest", genNONE, =
specBITEST) /* VXT */
DEFNAME ("BIT_SIZE", "bit_size", "Bit_Size", genNONE, =
specBIT_SIZE) /* F90 */
DEFNAME ("BJTEST", "bjtest", "BJTest", genNONE, =
specBJTEST) /* VXT */
bsearch() looks through the array using a lowercase comparison and =
expects
to find bit_size collated before bitest, not BIT_SIZE collated after
BITEST. This problem may be the cause of other errors with respect to
types of intrinsics.
Because of g77's options for cases, re-sorting the array or
changing the default case would only cover up the problem. libiberty
provides strcasecmp, so maybe that should be used for the comparison
instead of writing all case variants.
David
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: fortran/3743: Reference to intrinsic `ISHFT' invalid
@ 2002-01-31 11:34 toon
0 siblings, 0 replies; 6+ messages in thread
From: toon @ 2002-01-31 11:34 UTC (permalink / raw)
To: David.Billinghurst, gcc-bugs, gcc-prs, nobody, toon
Synopsis: Reference to intrinsic `ISHFT' invalid
Responsible-Changed-From-To: unassigned->toon
Responsible-Changed-By: toon
Responsible-Changed-When: Thu Jan 31 11:34:23 2002
Responsible-Changed-Why:
My job.
State-Changed-From-To: analyzed->closed
State-Changed-By: toon
State-Changed-When: Thu Jan 31 11:34:23 2002
State-Changed-Why:
Fixed in 3.1
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=3743
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: fortran/3743: Reference to intrinsic `ISHFT' invalid
@ 2002-01-14 20:06 Billinghurst, David (CRTS)
0 siblings, 0 replies; 6+ messages in thread
From: Billinghurst, David (CRTS) @ 2002-01-14 20:06 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR fortran/3743; it has been noted by GNATS.
From: "Billinghurst, David (CRTS)" <David.Billinghurst@riotinto.com>
To: <gcc-gnats@gcc.gnu.org>
Cc:
Subject: Re: fortran/3743: Reference to intrinsic `ISHFT' invalid
Date: Tue, 15 Jan 2002 12:02:35 +0800
Further analysis of this PR, and a suggested fix, at:
http://gcc.gnu.org/ml/gcc-patches/2002-01/msg00000.html
http://gcc.gnu.org/ml/gcc-patches/2002-01/msg00049.html
http://gcc.gnu.org/ml/gcc-patches/2002-01/msg00091.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: fortran/3743: Reference to intrinsic `ISHFT' invalid
@ 2001-12-31 15:15 dje
0 siblings, 0 replies; 6+ messages in thread
From: dje @ 2001-12-31 15:15 UTC (permalink / raw)
To: David.Billinghurst, gcc-bugs, gcc-prs, nobody
Synopsis: Reference to intrinsic `ISHFT' invalid
State-Changed-From-To: open->analyzed
State-Changed-By: dje
State-Changed-When: Mon Dec 31 15:15:18 2001
State-Changed-Why:
G77 does not recognize BIT_SIZE intrinsic as integer. The
implicit type for a function whose name begins with the
letter 'B' is REAL, so G77 reports that a function returning
basictypeREAL is not a valid argument to the ISHFT intrinsic
expecting a basictypeINTEGER argument. Declaring BIT_SIZE
as INTEGER removes the error.
It is unclear why this only fails on some targets. BIT_SIZE
does not seem to be recognized as an intrinsic when the
arguments to ISHFT are examined, it considers BIT_SIZE a
function returning REAL. Is something non-deterministic
in the parser?
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=3743
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: fortran/3743: Reference to intrinsic `ISHFT' invalid
@ 2001-07-26 17:36 Billinghurst, David (CRTS)
0 siblings, 0 replies; 6+ messages in thread
From: Billinghurst, David (CRTS) @ 2001-07-26 17:36 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR fortran/3743; it has been noted by GNATS.
From: "Billinghurst, David (CRTS)" <David.Billinghurst@riotinto.com>
To: "'gcc-gnats@gcc.gnu.org'" <gcc-gnats@gcc.gnu.org>, nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org
Subject: RE: fortran/3743: Reference to intrinsic `ISHFT' invalid
Date: Fri, 27 Jul 2001 00:28:34 -0000
This may be related to PR fortran/3807: Function BESJN(integer,double)
problems
^ permalink raw reply [flat|nested] 6+ messages in thread
* fortran/3743: Reference to intrinsic `ISHFT' invalid
@ 2001-07-19 23:06 David.Billinghurst
0 siblings, 0 replies; 6+ messages in thread
From: David.Billinghurst @ 2001-07-19 23:06 UTC (permalink / raw)
To: gcc-gnats
>Number: 3743
>Category: fortran
>Synopsis: Reference to intrinsic `ISHFT' invalid
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jul 19 23:06:06 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: David Billinghurst
>Release: 2.95.2 and 3.1 CVS
>Organization:
>Environment:
mips-sgi-irix6.5
>Description:
Attached program gives error on mips-sgi-irix6.5, but not on i686-pc-cygwin or SGI f90
Error is:
j.f: In program `MAIN__':
j.f:14:
i3 = ISHFT(i,BIT_SIZE(i))
^
Reference to intrinsic `ISHFT' at (^) invalid -- one or more arguments have incorrect type
According to F90 standard (section 15.13)
* the first arg of ISHIFT is integer type
* the second arg of ISHIFT is integer type
* the return type of BIT_SIZE is same as argument
* the return type of ISHFT is same as the first arg
####################################
c On mips-sgi-irix6.5 get
c
c i3 = ISHFT(i,BIT_SIZE(i))
c ^
c Reference to intrinsic `ISHFT' at (^) invalid --
c one or more arguments have incorrect type
c
c David Billinghurst <David.Billinghurst@riotinto.com>
c
integer i, i2, i3
i = 3
i2 = BIT_SIZE(i)
i3 = ISHFT(i,i2)
i3 = ISHFT(i,BIT_SIZE(i))
end
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2002-01-31 19:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-22 22:16 fortran/3743: Reference to intrinsic `ISHFT' invalid Billinghurst, David (CRTS)
-- strict thread matches above, loose matches on Subject: below --
2002-01-31 11:34 toon
2002-01-14 20:06 Billinghurst, David (CRTS)
2001-12-31 15:15 dje
2001-07-26 17:36 Billinghurst, David (CRTS)
2001-07-19 23:06 David.Billinghurst
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).