[Patch, Fortran, OOP] PR 50625: [4.6/4.7 Regression] ALLOCATABLE attribute lost for module CLASS variables
Janus Weil
janus@gcc.gnu.org
Fri Oct 7 10:18:00 GMT 2011
Hi all,
here is a small patch for an OOP regression. The title of the PR is a
bit misleading, since it's actually not the ALLOCATABLE attribute
which gets lost, but the 'class_ok' attribute, which we use for
checking if a class declaration is valid. When reading class variables
from a module, we can just set this attribute to '1' (if there was an
error, it would have been caught earlier).
Moreover there was a slight problem with backend_decl's not being
present for class symbols, which is being fixed by the hunk in
trans-decl.c.
Regtested successfully on x86_64-unknown-linux-gnu (except for failure
on entry_4 and select_type_12, which are known middle-end
regressions). Ok for trunk and 4.6?
Cheers,
Janus
2011-10-07 Janus Weil <janus@gcc.gnu.org>
PR fortran/50625
* class.c (gfc_build_class_symbol): Fix whitespace.
* module.c (mio_symbol): Set 'class_ok' attribute.
* trans-decl.c (gfc_get_symbol_decl): Make sure the backend_decl has
been built for class symbols.
2011-10-07 Janus Weil <janus@gcc.gnu.org>
PR fortran/50625
* gfortran.dg/class_46.f03: New.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr50625.diff
Type: text/x-diff
Size: 1551 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20111007/cba31be0/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: class_46.f03
Type: application/octet-stream
Size: 329 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20111007/cba31be0/attachment.obj>
More information about the Fortran
mailing list