https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78395
--- Comment #5 from janus at gcc dot gnu.org --- (In reply to Chris from comment #4) > 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 > > [..] > gcc version 6.2.0 20160901 (Ubuntu 6.2.0-3ubuntu11~16.04) My gfortran-6 version is what currently is in Ubuntu 16.10: gcc version 6.2.0 20161005 (Ubuntu 6.2.0-5ubuntu12) and that does not give an ICE, but the error shown above. > Would there be some issue with the build which is causing the ICE for me? Not sure. Since our versions differ a bit, the most probable scenario is that the different behavior was caused by some recent backport (unfortunately Ubuntu does not give exact revision numbers). One should check the logfile: https://gcc.gnu.org/viewcvs/gcc/branches/gcc-6-branch/gcc/fortran/ChangeLog?view=markup > 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. True. Didn't notice that. I guess the error should only apply to intrinsic assignment, not user-defined. So maybe that's a bug after all. > Indeed, it is used a line or two earlier in the > example I provided. Which one do you mean exactly? Shouldn't they all use the user-defined assignment function? In any case the error is thrown on the last line, and I also get it on the reduced example in comment 3: $ gfortran-6 c3.f90 c3.f90:62:2: v6 = 3 * v4%get_t2() ! This line is the one which causes ICE 1 Error: Assignment to an allocatable polymorphic variable at (1) is not yet supported