[Patch, Fortran] PR 81770: [5/6/7 Regression] Bogus warning: Pointer in pointer assignment might outlive the pointer target

Thomas Koenig tkoenig@netcologne.de
Mon Aug 28 08:34:00 GMT 2017


Hi Janus,

> the attached patch fixes a bogus warning. The purpose of the warning
> is to detect cases where a pointer lives longer than its target. If
> the target itself is (1) a pointer or (2) a component of a DT pointer,
> we do not know about the lifetime of the target at compile time and no
> warning should be thrown. The existing check only handles case (1) and
> my patch adds the handling of case (2).
> 
> Regtestes cleanly on x86_64-linux-gnu. Ok for trunk and the release branches?

OK, and thanks for the patch!

Regards

	Thomas



More information about the Fortran mailing list