[Bug fortran/57284] [OOP] ICE with find_array_spec for polymorphic arrays
gerhard.steinmetz.fortran@t-online.de
gcc-bugzilla@gcc.gnu.org
Thu Jun 23 18:37:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57284
Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gerhard.steinmetz.fortran@t
| |-online.de
--- Comment #7 from Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> ---
Compiles if "size" is replaced with synonym "product(shape)".
$ cat z5.f90
module m
type t
end type
contains
function foo(a, b) result(add)
class(t), intent(in) :: a(:)
class(t), intent(in) :: b(product(shape(a)))
type(t) :: add(product(shape(a)))
end function
end module
program p
use m
end program
$ gfortran-6 -g -O0 -fcheck=all z5.f90
$ cat z6.f90
module m
type t
end type
contains
function foo(a, b) result(add)
class(*), intent(in) :: a(:)
class(*), intent(in) :: b(product(shape(a)))
type(t) :: add(product(shape(a)))
end function
end module
program p
use m
end program
$ gfortran-6 -g -O0 -fcheck=all z6.f90
Remark:
This workaround may or may not work for production codes, it depends.
More information about the Gcc-bugs
mailing list