https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94660
innspg at yahoo dot fr changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |innspg at yahoo dot fr --- Comment #1 from innspg at yahoo dot fr --- Created attachment 48306 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48306&action=edit tar files of fortran Source files that reproduce the bug The attachment is a tar file containing 4 fortran sources codes to reproduce the bug. gfortran 4.8.5 produces the expected result All other versions that I tried produced the wrong results; those versions are: 6.3.0, 7.3.0, 7.5.0, 8.2.0, 8.4.0 and 9.2.0. The expected output when the program is ran should be: Test: calling C%init B::init, calling setup C::setup B::init done ............... Test: calling C%finalize B::finalize, calling free_resources C::free_resources B::finalize, calling cleanup B::cleanup B::finalize done ................... Test:done....................... I am getting this instead: Test: calling C%init B::init, calling setup B::cleanup B::init done ............... Test: calling C%finalize B::finalize, calling free_resources C::setup B::finalize, calling cleanup B::cleanup B::finalize done ................... Test:done.......................