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

2012-06-08 Thread Janus Weil
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

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

2012-06-08 Thread Janus Weil
[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=revisionrevision=145331. Does anyone have an opinion on this?] Possibly the comment

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

2012-06-08 Thread Tobias Burnus
Hi, Janus Weil wrote: 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

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

2012-06-08 Thread Janus Weil
Hi, 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

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

2012-06-08 Thread Tobias Burnus
Janus Weil wrote: In any case, for those two, it does not trigger but one gets later (resolve?) the error: Error: Allocate-object at (1) must be ALLOCATABLE or a POINTER Then I guess one can just remove the FIXME. That's fine with me. Regarding the error: Error: Allocate-object at (1) is

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

2012-06-08 Thread Steve Kargl
On Fri, Jun 08, 2012 at 12:40:10PM +0200, Janus Weil wrote: [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=revisionrevision=145331.

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

2012-06-08 Thread Janus Weil
[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=revisionrevision=145331. Does anyone have an opinion on this?] It's been too long!  I

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

2012-06-08 Thread Janus Weil
Attached is a third version of the patch, which I will commit soon. It adds at least the relevant standard reference to the resolution-stage check, too, and fixes the regressions resulting from the changed error message. Committed as r188335. Cheers, Janus

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

2012-06-08 Thread Steve Kargl
On Fri, Jun 08, 2012 at 07:10:02PM +0200, Janus Weil wrote: [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=revisionrevision=145331.