https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78395
--- Comment #4 from Chris <cmacmackin at gmail dot com> --- I tried compiling (my original example) on a different box, this one with gfortran 6.2.0 obtained from the ubuntu-toolchain-r/test PPA. I got Driving: gfortran-6 -v minimal.f90 -l gfortran -l m -shared-libgcc Using built-in specs. COLLECT_GCC=gfortran-6 COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/6/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 6.2.0-3ubuntu11~16.04' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-6 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --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 --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 6.2.0 20160901 (Ubuntu 6.2.0-3ubuntu11~16.04) COLLECT_GCC_OPTIONS='-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /usr/lib/gcc/x86_64-linux-gnu/6/f951 minimal.f90 -quiet -dumpbase minimal.f90 -mtune=generic -march=x86-64 -auxbase minimal -version -fintrinsic-modules-path /usr/lib/gcc/x86_64-linux-gnu/6/finclude -o /tmp/chris/ccDLOYCy.s GNU Fortran (Ubuntu 6.2.0-3ubuntu11~16.04) version 6.2.0 20160901 (x86_64-linux-gnu) compiled by GNU C version 6.2.0 20160901, GMP version 6.1.0, MPFR version 3.1.4, MPC version 1.0.3, isl version 0.15 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 GNU Fortran2008 (Ubuntu 6.2.0-3ubuntu11~16.04) version 6.2.0 20160901 (x86_64-linux-gnu) compiled by GNU C version 6.2.0 20160901, GMP version 6.1.0, MPFR version 3.1.4, MPC version 1.0.3, isl version 0.15 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 f951: internal compiler error: in gfc_add_component_ref, at fortran/class.c:241 0x5dede4 gfc_add_component_ref(gfc_expr*, char const*) ../../src/gcc/fortran/class.c:241 0x6564f1 resolve_typebound_function ../../src/gcc/fortran/resolve.c:6014 0x6564f1 gfc_resolve_expr(gfc_expr*) ../../src/gcc/fortran/resolve.c:6357 0x60730a gfc_extend_expr(gfc_expr*) ../../src/gcc/fortran/interface.c:3943 0x656064 resolve_operator ../../src/gcc/fortran/resolve.c:3850 0x656064 gfc_resolve_expr(gfc_expr*) ../../src/gcc/fortran/resolve.c:6339 0x65cab3 gfc_resolve_code(gfc_code*, gfc_namespace*) ../../src/gcc/fortran/resolve.c:10459 0x65f282 resolve_codes ../../src/gcc/fortran/resolve.c:15656 0x65f37e gfc_resolve(gfc_namespace*) ../../src/gcc/fortran/resolve.c:15691 0x64a62a resolve_all_program_units ../../src/gcc/fortran/parse.c:5854 0x64a62a gfc_parse_file() ../../src/gcc/fortran/parse.c:6106 0x68c1c2 gfc_be_parse_file ../../src/gcc/fortran/f95-lang.c:201 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <file:///usr/share/doc/gcc-6/README.Bugs> for instructions. Would there be some issue with the build which is causing the ICE for me? The error message which you reported for gfortran 6.2.0 also doesn't make sense to me, as I use defined-assignment to allocatable variables frequently in my code without problem. Indeed, it is used a line or two earlier in the example I provided.