https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128032
Bug ID: 128032
Summary: [cppcheck] gcc/fortran/openmp.cc:11830: Possible
cut'n'paste error ?
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: dcb314 at hotmail dot com
Target Milestone: ---
cppcheck says:
gcc/fortran/openmp.cc:11830:7: style: Same expression
'omp_clauses->simdlen_expr->ts.type==BT_INTEGER' found multiple times in chain
of '&&' operators. [duplicateExpression]
Source code is
if (omp_clauses->safelen_expr && omp_clauses->simdlen_expr
&& omp_clauses->safelen_expr->expr_type == EXPR_CONSTANT
&& omp_clauses->simdlen_expr->ts.type == BT_INTEGER
&& omp_clauses->simdlen_expr->expr_type == EXPR_CONSTANT
&& omp_clauses->simdlen_expr->ts.type == BT_INTEGER
&& mpz_cmp (omp_clauses->safelen_expr->value.integer,
omp_clauses->simdlen_expr->value.integer) < 0)
Suggest code rework.