https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66927
--- Comment #3 from vehre at gcc dot gnu.org --- F2008, C633 says: (R631) If allocate-object is an array either allocate-shape-spec-list shall appear or source-expr shall appear and have the same rank as allocate-object. If allocate-object is scalar, allocate-shape-spec-list shall not appear. So you can fix your code, by removing the array-description from the object to allocate. I am aware, that this kind of code is motivated by former gfortran not being able to take the array-spec from the source= expression. But now it is.