public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "mikael at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/46244] gfc_compare_derived_types is buggy Date: Sun, 20 Feb 2011 23:18:00 -0000 [thread overview] Message-ID: <bug-46244-4-uRAWsmjzSm@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-46244-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46244 --- Comment #15 from Mikael Morin <mikael at gcc dot gnu.org> 2011-02-20 23:13:32 UTC --- (In reply to comment #13) > Although I prefer the first form, if it is proven that it is too much work to > recover it, the second one requires only to adjust the tests. I didn't notice there was a second part in the error message, so I thought the new message was better (more precise). It is just a gfc_compare_type VS gfc_TK_compatible change, I believe. Actually none of the gfc_compare_type/gfc_TK_compatible changes are absolutely necessary to fix this bug. It is just I found it odd that gfc_compare_type was calling gfc_type_compatible (compatible types are not necessary equal/equivalent), so I changed it so that gfc_type_compatible calls gfc_compare_type instead. And then the new gfc_TK_compatible function to not upset the testsuite. Maybe I just don't understand what "compare types" means. :-( > More annoying the > patch breaks the 'move_alloc()' calls, e.g., pr42274 comment #1 or pr42769 > comment #1 (apparently this new feature is not tested in the test suite). Will look into it later. > > While looking at the code I have noticed something odd at lines 408 of > gcc/fortran/interface.c (patched file): > > if (derived1 != NULL && derived2 != NULL > && strcmp (derived1->name, derived2->name) == 0 > && derived1->module != NULL && derived2->module != NULL > && strcmp (derived1->module, derived2->module) == 0) > return 1; > > /* Compare type via the rules of the standard. Both types must have > the SEQUENCE attribute to be equal. */ > > if (strcmp (derived1->name, derived2->name)) > return 0; > > If the test 'derived1 != NULL && derived2 != NULL' is really required (i.e., > derived1 or derived2 can be NULL when entering the proc), is not it also > required later in the code (e.g., strcmp (derived1->name, derived2->name))? Hem, yes, who wrote this? ( I hope it's not me ;-) ).
next prev parent reply other threads:[~2011-02-20 23:14 UTC|newest] Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-10-30 14:24 [Bug fortran/46244] New: " janus at gcc dot gnu.org 2010-10-30 14:30 ` [Bug fortran/46244] " janus at gcc dot gnu.org 2010-10-30 14:54 ` janus at gcc dot gnu.org 2010-10-30 15:04 ` janus at gcc dot gnu.org 2010-10-30 15:11 ` janus at gcc dot gnu.org 2010-10-30 16:02 ` mikael at gcc dot gnu.org 2010-10-30 16:04 ` mikael at gcc dot gnu.org 2010-11-05 13:56 ` dominiq at lps dot ens.fr 2010-11-05 15:01 ` burnus at gcc dot gnu.org 2010-11-06 13:00 ` burnus at gcc dot gnu.org 2010-11-10 17:45 ` burnus at gcc dot gnu.org 2010-11-10 17:49 ` burnus at gcc dot gnu.org 2011-02-20 16:58 ` mikael at gcc dot gnu.org 2011-02-20 17:01 ` mikael at gcc dot gnu.org 2011-02-20 21:07 ` dominiq at lps dot ens.fr 2011-02-20 22:20 ` dominiq at lps dot ens.fr 2011-02-20 23:18 ` mikael at gcc dot gnu.org [this message] 2011-02-21 9:37 ` paul.richard.thomas at gmail dot com 2011-10-02 17:47 ` dominiq at lps dot ens.fr 2011-10-02 22:06 ` mikael at gcc dot gnu.org 2024-01-19 18:00 ` mikael 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-46244-4-uRAWsmjzSm@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).