http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50410
Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |burnus at gcc dot gnu.org --- Comment #6 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-10-17 16:38:28 UTC --- To check: - Pointer attribute in the part ref - or an allocate attribute. - Whether there is already some initialization. If one uses a constructor, it affects the whole variable, but mixing different data statements is OK as long as different parts are initialized. - If one directly access the variable: Pointer init is only OK for null() Example for the last item: integer, pointer :: u data u /1/ ! Accepted, but probably shouldn't ! data u/null()/ ! Probably OK (and currently accepted). end I think it could be sufficient to check decl.c's var_element though it might fail if one initializes a DT piecewise; if so, one needs to add a check to data.c or modify something else in decl.c