public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "gcc at abeckmann dot de" <gcc-bugzilla@gcc.gnu.org> 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 [thread overview] Message-ID: <bug-95366-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95366 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=48618&action=edit 2 modules and a main program that demonstrate the bug This is a regression in gfortran-10: in some cases SELECT TYPE (arg) TYPE IS(CHARACTER(*)) ... CLASS DEFAULT ... does not match a polymorphic (class(*)) argument as character but falls through to the class default, even though the subroutine was called with a character(len=42) argument. This bug seems require caller and callee residing 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).
next reply other threads:[~2020-05-27 13:55 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-05-27 13:55 gcc at abeckmann dot de [this message] 2020-05-27 14:27 ` [Bug fortran/95366] [10/11 Regression] TYPE IS(character(*)) no longer matches since r10-3605-gf61e54e59cda5a2e marxin at gcc dot gnu.org 2020-05-28 7:35 ` rguenth at gcc dot gnu.org 2020-06-13 7:13 ` tkoenig at gcc dot gnu.org 2020-06-30 13:59 ` tkoenig at gcc dot gnu.org 2020-07-05 17:51 ` cvs-commit at gcc dot gnu.org 2020-07-05 17:52 ` tkoenig at gcc dot gnu.org
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=bug-95366-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@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).