[Bug libfortran/97581] libgfortran/intrinsics/random.c:754: bad array size ?
dcb314 at hotmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Oct 27 07:37:59 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97581
--- Comment #2 from David Binderman <dcb314 at hotmail dot com> ---
(In reply to anlauf from comment #1)
> No, this would be definitely wrong.
Agreed.
> If the original code does not make you happy, do you think sth. along
>
> #define SZ (SZU64 * (sizeof (uint64_t) / sizeof (GFC_INTEGER_4)))
>
> would be better?
I think it would. Using a more descriptive name than SZ would be even better.
Perhaps SZ_IN_INT_4 ?
And so the other definition of SZ for random_seed_i8 could be SZ_IN_INT_8.
It might make the code slightly clearer and avoid having two different
# defines for SZ.
More information about the Gcc-bugs
mailing list