https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92065
Rolf <rolf.h.myhre at ntnu dot no> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rolf.h.myhre at ntnu dot no --- Comment #2 from Rolf <rolf.h.myhre at ntnu dot no> --- I get the same error message when making a class with two subroutines that take an array of class(*), dimension(n). It seemed to work fine when there was only one subroutine or when at least the first subroutine were declared with an assumed shape array. This minimal example appears to work as long as the second routine is not declared with intent(out), but this still crashed for the original code. output from gfortran -v : Using built-in specs. COLLECT_GCC=gfortran COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 8.3.0-6ubuntu1~18.04.1' --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-8 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 8.3.0 (Ubuntu 8.3.0-6ubuntu1~18.04.1) command line: gfortran mybug.F90 error message: during RTL pass: expand mybug.F90:32:0: subroutine bar(this, array, n) internal compiler error: in expand_expr_real_1, at expr.c:10047 Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-8/README.Bugs> for instructions. minimal example, mybug.F90: module bugbug_mod ! implicit none ! type :: bug_type ! contains ! procedure :: foo procedure :: bar ! end type bug_type ! ! contains ! ! subroutine foo(this, array, n) ! implicit none ! class(bug_type), intent(in) :: this ! integer, intent(in) :: n ! class(*), intent(in), dimension(n) :: array ! end subroutine foo ! ! subroutine bar(this, array, n) ! implicit none ! class(bug_type), intent(in) :: this ! integer, intent(in) :: n ! class(*), intent(out), dimension(n) :: array ! end subroutine bar ! ! end module bugbug_mod