This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch, Fortran, OOP] PR 52552: ICE when trying to allocate non-allocatable object giving a dynamic type


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  <janus@gcc.gnu.org>

	PR fortran/52552
	* match.c (gfc_match_allocate): Modify order of checks.


2012-06-08  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/52552
	* gfortran.dg/allocate_with_typespec_7.f90: New test case.

Attachment: pr52552.diff
Description: Binary data

Attachment: allocate_with_typespec_7.f90
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]