[Patch, fortran] PR64921 class_allocate_18 failure
Uros Bizjak
ubizjak@gmail.com
Wed Jul 29 19:50:00 GMT 2015
Hello!
> I submit the PR64921 fix I posted two days ago on bugzilla.
>
> The problem comes from the finalization wrapper not having the always_explicit attribute set, so
> that when it is called, the array argument is passed without descriptor, but the argument
> declaration is a descriptor array. Boom! Normally the always_explicit attribute is set automatically
> during resolution, but the code generated by finalization is not passed through resolution. As
> resolution also takes care of error reporting,
>
> I prefer to not pass the generated code through resolution.
>
> So the attached patch just sets the flag.
> I think it can be backported.
Please also add the testcase from the PR, Comment #14 [1]. The failure
mode of this problem is a difficult to detect invalid read in
class_allocate_18, but the testcase from the PR outright crashes.
[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64921#c14
Uros.
More information about the Fortran
mailing list