https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124259
Bug ID: 124259
Summary: Two places where large structs are function parameters
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: dcb314 at hotmail dot com
Target Milestone: ---
Static analyser cppcheck says:
1.
gcc/fortran/trans.cc:1612:21: performance: Function parameter 'attr' should be
passed by const reference. [passedByValue]
Source code is
gfc_finalize_tree_expr (gfc_se *se, gfc_symbol *derived,
symbol_attribute attr, int rank)
2.
gcc/fortran/target-memory.cc:740:38: performance: Function parameter 'ts'
should be passed by const reference. [passedByValue]
Source code is
gfc_merge_initializers (gfc_typespec ts, gfc_expr *e, locus *loc,
unsigned char *data,
unsigned char *chk, size_t length)