Hi all, here is a patch for an ICE-on-invalid bug, which concerns the allocation of CLASS variables. The ICE is fixed by changing the order of the checks which are done in gfc_match_allocate, so that an error is triggered before the ICE can occur.
Regtested on x86_64-unknown-linux-gnu. Ok for trunk? [Side note: The piece of code which I'm moving contains a FIXME comment, which I don't quite understand, so I'm not sure whether it is still valid. It was added by Steve in http://gcc.gnu.org/viewcvs?view=revision&revision=145331. Does anyone have an opinion on this?] Cheers, Janus 2012-06-08 Janus Weil <ja...@gcc.gnu.org> PR fortran/52552 * match.c (gfc_match_allocate): Modify order of checks. 2012-06-08 Janus Weil <ja...@gcc.gnu.org> PR fortran/52552 * gfortran.dg/allocate_with_typespec_7.f90: New test case.
pr52552.diff
Description: Binary data
allocate_with_typespec_7.f90
Description: Binary data