This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/48066] [4.3/4.4/4.5/4.6 Regression] Segfault with SUM of zero-sized array


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]