This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/82312] [7/8 Regression] [OOP] Pointer assignment to component of class variable results wrong vptr for the variable.
- From: "pault at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 21 Oct 2017 17:10:15 +0000
- Subject: [Bug fortran/82312] [7/8 Regression] [OOP] Pointer assignment to component of class variable results wrong vptr for the variable.
- Auto-submitted: auto-generated
- References: <bug-82312-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82312
--- Comment #4 from Paul Thomas <pault at gcc dot gnu.org> ---
Author: pault
Date: Sat Oct 21 17:09:43 2017
New Revision: 253976
URL: https://gcc.gnu.org/viewcvs?rev=253976&root=gcc&view=rev
Log:
2017-10-21 Paul Thomas <pault@gcc.gnu.org>
PR fortran/82312
* resolve.c (gfc_resolve_code): Simplify condition for class
pointer assignments becoming regular assignments by asserting
that only class valued targets are permitted.
* trans-expr.c (trans_class_pointer_fcn): New function using a
block of code from gfc_trans_pointer_assignment.
(gfc_trans_pointer_assignment): Call the new function. Tidy up
a minor whitespace issue.
2017-10-21 Paul Thomas <pault@gcc.gnu.org>
PR fortran/82312
* gfortran.dg/typebound_proc_36.f90 : New test.
Added:
branches/gcc-7-branch/gcc/testsuite/gfortran.dg/typebound_proc_36.f90
Modified:
branches/gcc-7-branch/gcc/fortran/ChangeLog
branches/gcc-7-branch/gcc/fortran/resolve.c
branches/gcc-7-branch/gcc/fortran/trans-expr.c
branches/gcc-7-branch/gcc/testsuite/ChangeLog