This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug fortran/57285] [OOP] ICE on invalid: "gfc_array_dimen_size(): Bad dimension" due to SIZE intrinsic with invalid dim on CLASS dummy


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!)


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