public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: "Billinghurst, David \(CRTS\)" <David.Billinghurst@riotinto.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: fortran/3743: Reference to intrinsic `ISHFT' invalid Date: Tue, 22 Jan 2002 22:16:00 -0000 [thread overview] Message-ID: <20020123061603.9671.qmail@sources.redhat.com> (raw) 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
next reply other threads:[~2002-01-23 6:16 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-01-22 22:16 Billinghurst, David (CRTS) [this message] -- 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20020123061603.9671.qmail@sources.redhat.com \ --to=david.billinghurst@riotinto.com \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).