This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/57285] [OOP] ICE on invalid: "gfc_array_dimen_size(): Bad dimension" due to SIZE intrinsic with invalid dim on CLASS dummy
- From: "janus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 15 May 2013 14:09:25 +0000
- Subject: [Bug fortran/57285] [OOP] ICE on invalid: "gfc_array_dimen_size(): Bad dimension" due to SIZE intrinsic with invalid dim on CLASS dummy
- Auto-submitted: auto-generated
- References: <bug-57285-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57285
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-05-15
CC| |janus at gcc dot gnu.org
Summary|ICe on invalid: |[OOP] ICE on invalid:
|"gfc_array_dimen_size(): |"gfc_array_dimen_size():
|Bad dimension" due to |Bad dimension" due to SIZE
|size() intrinsic with |intrinsic with invalid dim
|invalid dim on class() |on CLASS dummy
|dummy argument |
Ever confirmed|0 |1
--- Comment #2 from janus at gcc dot gnu.org ---
Confirmed. Changing "a" from CLASS to TYPE ...
type type_t
end type
contains
subroutine foo(a)
type(type_t), intent(in) :: a(:)
type(type_t) :: c(size(a,dim=2))
end subroutine
end
... one gets the correct error message:
type(type_t) :: c(size(a,dim=2))
1
Error: 'dim' argument of 'size' intrinsic at (1) is not a valid dimension index
(unfortunately twice!)