gcc/fortran/ChangeLog: 2016-02-02 Andre Vehreschild PR fortran/69296 * gfortran.h: Added flag to gfc_association_list indicating that the rank of an associate variable has been guessed only. * parse.c (parse_associate): Set the guess flag mentioned above when guessing the rank of an expression. * resolve.c (resolve_assoc_var): When the rank has been guessed, make sure, that the guess was correct else overwrite with the actual rank. * trans-stmt.c (trans_associate_var): For subref_array_pointers in class objects, take the span from the _data component. gcc/testsuite/ChangeLog: 2016-02-02 Andre Vehreschild * gfortran.dg/associate_19.f03: New test. * gfortran.dg/associate_20.f03: New test.