[Bug fortran/95186] New: Optimize allocate(..., source=0) or allocate(..., source=[0.0, 0.0, ...]) to use calloc instead of malloc
burnus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon May 18 13:07:49 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95186
Bug ID: 95186
Summary: Optimize allocate(..., source=0) or allocate(...,
source=[0.0, 0.0, ...]) to use calloc instead of
malloc
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: burnus at gcc dot gnu.org
Target Milestone: ---
calloc returns zeroed memory, hence, for "source=0.0" or "source=0" (or the
array equivalent, if ever used), calloc instead of malloc could be used.
More information about the Gcc-bugs
mailing list