[Patch, fortran] [4.7/4.8 Regression] [OOP] ICE on invalid: gfc_variable_attr(): Bad array reference

Paul Richard Thomas paul.richard.thomas@gmail.com
Wed Jan 2 21:33:00 GMT 2013


Dear Tobias,

First of all, thanks for the review!  I still owe you my comments on
FINAL; I got lost in trying to fix these various regressions :-)  I
promise that I'll come back to you first thing tomorrow.

>
> It looks mostly okay; however, you do not handle vector sections correctly,
> which leads to an ICE. Without your patch, one gets:
>    Error: CLASS selector at (1) needs a temporary which is not yet
> implemented
>
> With your patch, it fails as one has:

This was fairly easily fixed - see attached.

....snip...

> I am not quite sure whether the following ICE has the same cause or a
> different one, but it also ICEs with your patch applied:
>
> module gn
>   type :: ncb
>   end type ncb
>   type, public :: tn
>      class(ncb), allocatable :: cb[:]
>   end type tn
> contains
>   integer function name(self)
>     implicit none
>     class (tn), intent(in) :: self
>     select type (component => self%cb[4])
> ! ALSO FAILS: "(component => self%cb)"
>     end select
>   end function name
> end module gn

This co-array example was never OK, as far as I can tell.  The error
is similar to that of the PR.  However, co-arrays were just never
handled at all.... again, as far as I can tell.  I'll have a go at it
tomorrow night.

With best regards

Paul
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr55172a.diff
Type: application/octet-stream
Size: 2694 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20130102/dde45edc/attachment.obj>


More information about the Gcc-patches mailing list