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.