* (patch, fortran] PR83021 - [7/8 Regression] gfortran segfault in polymorphic assignment
@ 2017-11-26 21:57 Paul Richard Thomas
2017-11-29 10:09 ` Paul Richard Thomas
0 siblings, 1 reply; 2+ messages in thread
From: Paul Richard Thomas @ 2017-11-26 21:57 UTC (permalink / raw)
To: fortran, gcc-patches
[-- 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. */
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: (patch, fortran] PR83021 - [7/8 Regression] gfortran segfault in polymorphic assignment
2017-11-26 21:57 (patch, fortran] PR83021 - [7/8 Regression] gfortran segfault in polymorphic assignment Paul Richard Thomas
@ 2017-11-29 10:09 ` Paul Richard Thomas
0 siblings, 0 replies; 2+ messages in thread
From: Paul Richard Thomas @ 2017-11-29 10:09 UTC (permalink / raw)
To: fortran, gcc-patches
Committed to 7-branch and trunk and r255205 and r255202 respectively.
Paul
On 26 November 2017 at 18:40, Paul Richard Thomas
<paul.richard.thomas@gmail.com> wrote:
> 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.
--
"If you can't explain it simply, you don't understand it well enough"
- Albert Einstein
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-11-29 10:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-26 21:57 (patch, fortran] PR83021 - [7/8 Regression] gfortran segfault in polymorphic assignment Paul Richard Thomas
2017-11-29 10:09 ` Paul Richard Thomas
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).