https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97581
Bug ID: 97581 Summary: libgfortran/intrinsics/random.c:754: bad array size ? Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libfortran Assignee: unassigned at gcc dot gnu.org Reporter: dcb314 at hotmail dot com Target Milestone: --- gcc has a new warning, so a problem is found in fortran library. libgfortran/intrinsics/random.c:754:37: warning: expression does not compute the number of elements in this array; element type is ‘uint64_t’ {aka ‘long unsigned int’}, not ‘GFC_INTEGER_4’ {aka ‘int’} [-Wsizeof-array-div] Source code is #define SZ (sizeof (master_state.s) / sizeof (GFC_INTEGER_4)) Maybe better code #define SZ (sizeof (master_state.s) / sizeof (master_state.s[0]))