[Bug fortran/48066] [4.3/4.4/4.5/4.6 Regression] Segfault with SUM of zero-sized array
tkoenig at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Mar 12 10:16:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48066
--- Comment #8 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2011-03-12 10:15:59 UTC ---
(In reply to comment #7)
> --- m4/ifunction_logical.m4 (Revision 170320)
> +++ m4/ifunction_logical.m4 (Arbeitskopie)
> @@ -49,8 +49,8 @@
> src_kind = GFC_DESCRIPTOR_SIZE (array);
>
> len = GFC_DESCRIPTOR_EXTENT(array,dim);
> - if (len < 0)
> - len = 0;
> + if (len <= 0)
> + return;
... probably would not work for printing empty arrays.
More information about the Gcc-bugs
mailing list