[Patch, Fortran, OOP] PR 49112: [4.6/4.7 Regression] Missing type-bound procedure, "duplicate save" warnings and internal compiler error
Mikael Morin
mikael.morin@sfr.fr
Sun Jul 31 09:26:00 GMT 2011
On Saturday 30 July 2011 17:43:03 Janus Weil wrote:
> Hi all,
>
> the PR in the subject line contains several issues, and with the
> "duplicate save" part fixed, the attached patch takes care of the
> "missing type-bound procedure" regression (comment #6).
>
> The problem is the following: When parsing a structure constructor, we
> have to resolve the derived type first. However, this will also
> trigger the construction of the vtab for this type (if it has
> type-bound procedures), which in turn will be incomplete if we're in
> the middle of a module and the type-bound procedures have not been
> parsed fully.
>
> To solve this dilemma, I have split off from 'resolve_fl_derived' a
> part which only concerns the data components etc
> ('resolve_fl_derived0'). This can be called whenever we encounter a
> structure constructor. The full 'resolve_fl_derived' will call this
> split-off part and in addition resolve the typebound procedures,
> thereby constucting the vtab.
>
> The patch was regtested on x86_64-unknown-linux-gnu. Ok for trunk and 4.6?
>
OK, Thanks.
Mikael
More information about the Gcc-patches
mailing list