From: Paul Richard Thomas <paul.richard.thomas@gmail.com>
To: "fortran@gcc.gnu.org" <fortran@gcc.gnu.org>,
gcc-patches <gcc-patches@gcc.gnu.org>
Subject: (patch, fortran] PR83021 - [7/8 Regression] gfortran segfault in polymorphic assignment
Date: Sun, 26 Nov 2017 21:57:00 -0000 [thread overview]
Message-ID: <CAGkQGi+94X_6s8=KRQMpi8wRbxqyxD0cRxr4Zm_cy6gAWVDJdA@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 787 bytes --]
Dear All,
This regression was caused by the patch for PR81447. The chunk that
has been modified came about because use association of derived types
in block data, in the presence of a vtable, was trying to add vtable
procedures, which is not allowed. The original patch did not
explicitly target block data and this is fixed here. I decided that a
testcase was not necessary but this could be done if desired.
Bootstrapped and regtested on FC23/x86_64 - OK for both branches?
I will commit tomorrow morning if there are no complaints.
Best regards
Paul
2017-11-26 Paul Thomas <pault@gcc.gnu.org>
PR fortran/83021
* resolve.c (resolve_component): Only escape for use assciated
vtypes if the current namespace has no proc_name and is most
particularly block data.
[-- Attachment #2: submit.diff --]
[-- Type: text/plain, Size: 812 bytes --]
Index: gcc/fortran/resolve.c
===================================================================
*** gcc/fortran/resolve.c (revision 255093)
--- gcc/fortran/resolve.c (working copy)
*************** resolve_component (gfc_component *c, gfc
*** 13502,13508 ****
if (c->attr.artificial)
return true;
! if (sym->attr.vtype && sym->attr.use_assoc)
return true;
/* F2008, C442. */
--- 13502,13512 ----
if (c->attr.artificial)
return true;
! /* Do not allow vtype components to be resolved in nameless namespaces
! such as block data because the procedure pointers will cause ICEs
! and vtables are not needed in these contexts. */
! if (sym->attr.vtype && sym->attr.use_assoc
! && sym->ns->proc_name == NULL)
return true;
/* F2008, C442. */
next reply other threads:[~2017-11-26 18:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-26 21:57 Paul Richard Thomas [this message]
2017-11-29 10:09 ` Paul Richard Thomas
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='CAGkQGi+94X_6s8=KRQMpi8wRbxqyxD0cRxr4Zm_cy6gAWVDJdA@mail.gmail.com' \
--to=paul.richard.thomas@gmail.com \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@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: link
Be 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).