[Patch, Fortran, OOP] PR 45290/45271: pointer initialization / vtab init

Mikael Morin mikael.morin@sfr.fr
Fri Aug 20 10:25:00 GMT 2010


Le 20.08.2010 11:49, Janus Weil a écrit :
> Hi all,
>
> this patch fixes PR 45271 by giving static initializers to the PPC
> components of the vtabs. This is made possible by the recent progress
> on pointer initialization (PR 45290). A prerequisite for vtab
> initialization was fixing comment #6 of that PR, which is accomplished
> simply by removing an 'gcc_assert' in 'build_function_decl'.
>
> The central pieces of the patch are:
> 1) Setting up the initializer in class.c (add_proc_comp).
> 2) Removing 'gfc_trans_assign_vtab_procs', which handled the dynamic
> initialization of the vtab PPCs at runtime.
>
> Moreover some supplemental changes were needed, namely:
> 3) Modifying 'gfc_conv_initializer' to handle intialization of
> array-valued procedure pointers.
> 4) Modifying 'mio_component' to skip the initializers of the vtabs.
> This was done to fix a regression on class_15.f03. The initializers
> are actually only needed in the original module where the vtab is set
> up, but not anywhere else.
>
> The patch was regtested on x86_64-unknown-linux-gnu. Ok for trunk?

Looks good, yes.
The more you remove code, the more it works ;-).
Thanks for the patch.

Mikael



More information about the Gcc-patches mailing list