https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118745

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> ---
I guess it does not show in practice as '&odv->append_args_list->where' will be
implemented as '&odv->append_args_list' + offset – and the result is never
actually used. - At least, 'valgrind' does not detect it.

The issue is mixing up the append_arg vs. adjust_arg variables, which are
similarly named and also appear in the (almost) the same context.

--- a/gcc/fortran/trans-openmp.cc
+++ b/gcc/fortran/trans-openmp.cc
@@ -8841,3 +8841,3 @@ gfc_trans_omp_declare_variant (gfc_namespace *ns)
                variant_proc_sym->formal = extra_arg;
-             locus *loc = (odv->adjust_args_list
+             locus *loc = (odv->append_args_list
                            ? &odv->append_args_list->where :  &odv->where);

Reply via email to