From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B08D8396EC77; Wed, 27 May 2020 13:55:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B08D8396EC77 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1590587739; bh=4RlnQympD+yO82dqScHRrcHdfZzExdmiBhi7668nD/U=; h=From:To:Subject:Date:From; b=hL8Z5XrhV6p7R+0z7kWBpJVZLU5Rh/EcsK5CfK6Yln0IIdZJd5Uxqe7IunP0Txcyd U1JrgaC7r6FR5FMcMPMSooq/5Cucizf9UC9OqWBOTYxkEfyiMXuhwlssdCruhIKt0u 6XiYG7iKthAkTSCNvOUex4QrpQTI8qgwcXuamJrA= From: "gcc at abeckmann dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/95366] New: TYPE IS(character(*)) no longer matches Date: Wed, 27 May 2020 13:55:39 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: gcc at abeckmann dot de X-Bugzilla-Status: UNCONFIRMED 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: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: 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: Wed, 27 May 2020 13:55:39 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95366 Bug ID: 95366 Summary: TYPE IS(character(*)) no longer matches Product: gcc Version: 10.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gcc at abeckmann dot de Target Milestone: --- Created attachment 48618 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D48618&action=3Dedit 2 modules and a main program that demonstrate the bug This is a regression in gfortran-10: in some cases=20 SELECT TYPE (arg) TYPE IS(CHARACTER(*)) ... CLASS DEFAULT ... does not match a polymorphic (class(*)) argument as character but falls thr= ough to the class default, even though the subroutine was called with a character(len=3D42) argument. This bug seems require caller and callee resi= ding in different modules (i.e. different compilation units). A test case is attached: gfortran-10 -W -Wall -Wextra -c -o mod1.o mod1.f90 gfortran-10 -W -Wall -Wextra -c -o mod2.o mod2.f90 gfortran-10 -W -Wall -Wextra -c -o main.o main.f90 gfortran-10 main.o mod1.o mod2.o ./a.out int unknown while building with gfortran-9 works: gfortran-9 -W -Wall -Wextra -c -o mod1.o mod1.f90 gfortran-9 -W -Wall -Wextra -c -o mod2.o mod2.f90 gfortran-9 -W -Wall -Wextra -c -o main.o main.f90 gfortran-9 main.o mod1.o mod2.o ./a.out int char I observed this with the Debian 10.1.0-2 build (corresponding to git as of 20200515) and I could confirm it with git master (6c8e16aea85286721eb5689f9bcae09d36003cb1).=