public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch, Fortran] 0/3 (PR90076) Setting _vptr correctly.
@ 2024-06-11 12:37 Andre Vehreschild
  0 siblings, 0 replies; only message in thread
From: Andre Vehreschild @ 2024-06-11 12:37 UTC (permalink / raw)
  To: GCC-Patches-ML, GCC-Fortran-ML

Hi GFortraneers,

I like to present a small series of patches. While working of PR90076 and
figuring how to best set the _vptr of class types, I discovered several ways of
doing this in slightly different ways which are more or less complete (mostly
rather less). I therefore decided to fix not only the PR90076, but also to
approach the issue in a more general way. This results in these three patches:

1/3 Fix PR90076 by applying gfc_set_vptr() where missing.
2/3 Rigorously apply gfc_set_vptr() (and extend it slightly) to reset the _vptr
consistently.
3/3 RFC: First step on assigning to the _vptr.

Working on the second part of the patch series, I figured, that at several
locations in the fortran compiler we are assigning to class data types and each
location does it differently  (more or less complete). Therefore I got the idea
of creating a general function to do all necessary steps for assigning to a
class data type, like for example `gfc_add_modify_class (gfc_se *, tree to,
<something> from)`. The gfc_se is chosen to be able to produce a `pre` and
`post` set of statements, while the _data assignment is done in the `expr` to
be able to use gfc_add_modify_class() by the scalarizer.

I understand that this is long way to go. Therefore I first like to ask about
the general perception of this idea. So I like to hear constructive criticism.
Could I explain it good enough? Do you think it is worth pursuing?

Regards,
	Andre
--
Andre Vehreschild * Email: vehre ad gmx dot de

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-06-11 12:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-11 12:37 [Patch, Fortran] 0/3 (PR90076) Setting _vptr correctly Andre Vehreschild

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).