[Patch, fortran] PR64921 class_allocate_18 failure

Mikael Morin mikael.morin@sfr.fr
Wed Jul 29 17:48: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.

The test is already present on the trunk and 5 branch. I plan to add it 
to 4.9 as well.

Regression tested on x86_64-unkown-linux-gnu. OK for 6/5/4.9 ?

Mikael


-------------- next part --------------
2015-07-29  Mikael Morin  <mikael@gcc.gnu.org>

	PR fortran/64921
	* class.c (generate_finalization_wrapper): Set finalization
	procedure symbol's always_explicit attribute.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr64921_2.diff
Type: text/x-patch
Size: 518 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20150729/4e794d1f/attachment.bin>


More information about the Gcc-patches mailing list