This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/38536] ICE with C_LOC in resolve.c due to not properly going through expr->ref
- From: "tkoenig at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 13 Jan 2011 19:52:48 +0000
- Subject: [Bug fortran/38536] ICE with C_LOC in resolve.c due to not properly going through expr->ref
- Auto-submitted: auto-generated
- References: <bug-38536-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38536
--- Comment #18 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2011-01-13 19:52:31 UTC ---
(In reply to comment #6)
> An other failure:
>
> use iso_c_binding
> type t1
> integer :: i(5)
> end type t1
> type t2
> type(t1) :: t(5)
> end type t2
>
> character(len=2),target :: str(2)
> type(t2), target :: tt
> type(C_PTR) :: p
> p = c_loc(tt%t%i(1))
> end
This is ice-on-invalid (I asked on comp.lang.fortran) because tt%t is an array
section, which is not interoperable.
We just have to check for array sections along the references, and error out if
there are any.