Skip to content
Snippets Groups Projects
Commit 1a46400e authored by Mikael Morin's avatar Mikael Morin
Browse files

fortran: Use pre-evaluated class container if available [PR110618]

Add the possibility to provide a pre-evaluated class container argument
to gfc_add_finalizer to avoid repeatedly evaluating data reference
expressions in the generated code.

	PR fortran/110618

gcc/fortran/ChangeLog:

	* trans.h (gfc_add_finalizer_call): Add class container argument.
	* trans.cc (gfc_add_finalizer_call): Ditto.  Pass down new
	argument to get_final_proc_ref, get_elem_size, get_var_desc,
	and get_vptr.
	(get_elem_size): Add class container argument.
	Use provided class container if it's available.
	(get_var_descr): Same.
	(get_vptr): Same.
	(get_final_proc_ref): Same.  Add boolean telling the class
	container argument is used.  Set it.  Don't try to use
	final_wrapper if class container argument was used.
parent f60231e3
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment