------- Comment #2 from tkoenig at gcc dot gnu dot org 2006-04-08 21:47 ------- Checking wether size is negative won't work as a complete fix for this.
Consider the following example: $ cat a4.f90 program main real, allocatable:: a(:,:) allocate (a(1:-1,1:-1)) print *,size(a) end program main This (correctly) prints 0, but the allocated size is still nonzero (which we probably don't want). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26017