public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/93787] Rejects non-ambigous specific in generic –
       [not found] <bug-93787-4@http.gcc.gnu.org/bugzilla/>
@ 2021-02-14 13:47 ` dominiq at lps dot ens.fr
  2021-02-15 11:30 ` burnus at gcc dot gnu.org
  1 sibling, 0 replies; 2+ messages in thread
From: dominiq at lps dot ens.fr @ 2021-02-14 13:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93787

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-02-14

--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Confirmed.

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

* [Bug fortran/93787] Rejects non-ambigous specific in generic –
       [not found] <bug-93787-4@http.gcc.gnu.org/bugzilla/>
  2021-02-14 13:47 ` [Bug fortran/93787] Rejects non-ambigous specific in generic – dominiq at lps dot ens.fr
@ 2021-02-15 11:30 ` burnus at gcc dot gnu.org
  1 sibling, 0 replies; 2+ messages in thread
From: burnus at gcc dot gnu.org @ 2021-02-15 11:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93787

--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> ---
The problem is in count_types_test:

For 'type(*),dimension(..)', compare_type_rank_if accepts a scalar integer
For 'type(*),dimension(*)', it does not.

As 'dimension(..)' accepts scalars, the symmetry is broken.
* For count_types_test f1=(a,async), f2=(a,len,async), the check
   if (ac1 > ac2)
  is false as  ac1 < ac2
* For count_types_test f1=(a,len,async), f2=(a,async), counting
   for f1's: 'len': ac1 = 2 ('len', 'async' – as 'a' as different rank != 0)
  That's fine but now:
    counting all type-rank-compatibles in f2 finds '(a,async)'
  again 2 → 'if (ac1 > ac2)'

(Looking through the checks, I wonder whether there is an ambiguity issue with
 dimension(*) vs. dimension(1,*) vs. dimension(1,1,*)
as one can pass to all of them any array rank, including rank=0 (for array
element), but I have no checked whether other checks catch this nor what the
spec says.)


In this case, a simple count of all nonoptional arguments would solve it, but I
wonder whether there are some gotchas when playing more with dimension(..) (and
possibly type(*) or NO_ARG_CHECK).

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

end of thread, other threads:[~2021-02-15 11:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-93787-4@http.gcc.gnu.org/bugzilla/>
2021-02-14 13:47 ` [Bug fortran/93787] Rejects non-ambigous specific in generic – dominiq at lps dot ens.fr
2021-02-15 11:30 ` burnus at gcc dot gnu.org

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).