From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 169203861010; Mon, 15 Feb 2021 11:31:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 169203861010 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: =?UTF-8?B?W0J1ZyBmb3J0cmFuLzkzNzg3XSBSZWplY3RzIG5vbi1hbWJpZ291?= =?UTF-8?B?cyBzcGVjaWZpYyBpbiBnZW5lcmljIOKAkw==?= Date: Mon, 15 Feb 2021 11:30:59 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 11:31:00 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D93787 --- Comment #4 from Tobias Burnus --- 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=3D(a,async), f2=3D(a,len,async), the check if (ac1 > ac2) is false as ac1 < ac2 * For count_types_test f1=3D(a,len,async), f2=3D(a,async), counting for f1's: 'len': ac1 =3D 2 ('len', 'async' =E2=80=93 as 'a' as different= rank !=3D 0) That's fine but now: counting all type-rank-compatibles in f2 finds '(a,async)' again 2 =E2=86=92 'if (ac1 > ac2)' (Looking through the checks, I wonder whether there is an ambiguity issue w= ith dimension(*) vs. dimension(1,*) vs. dimension(1,1,*) as one can pass to all of them any array rank, including rank=3D0 (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, b= ut I wonder whether there are some gotchas when playing more with dimension(..) = (and possibly type(*) or NO_ARG_CHECK).=