Le 06/02/2014 11:43, Janus Weil a écrit : > Hi all, > > attached is a small patch which fixes an ICE-on-invalid regression > with finalization. In the PR, Dominique objected to the patch, but I > think it's the correct thing to do after all. The line that I'm > removing was added in a patch authored by Tobias and myself. I suspect > it was added to work around some other problem in the finalization > implementation, and there is no evidence it's actually needed. > > The patch regtests cleanly on x86_64-unknown-linux-gnu. Ok for trunk? > Wait a bit; let's try to understand the problem.
Normally I would say calling gfc_is_finalizable here in resolve_fl_derived0 is harmless because gfc_resolve_finalizers has been called before in resolve_fl_derived. BUT: resolve_fl_derived0 recurses on its parent type, while gfc_resolve_finalizers doesn't; and in this case we end up recursing on type "cfml" whose finalizers haven't been resolved yet. Now whether your patch is the right thing to do... I'm a bit skeptical about removing the one use of gfc_is_finalizable in resolve.c . On the other hand it is regression free... I'll think about it and try to come back to you tomorrow or so. Mikael