LGTM - however: On 26.04.22 14:38, Mikael Morin wrote:
--- a/gcc/fortran/trans-array.cc +++ b/gcc/fortran/trans-array.cc @@ -3698,7 +3698,8 @@ non_negative_strides_array_p (tree expr) if (DECL_P (expr) && DECL_LANG_SPECIFIC (expr)) if (tree orig_decl = GFC_DECL_SAVED_DESCRIPTOR (expr)) - return non_negative_strides_array_p (orig_decl); + if (orig_decl != expr) + return non_negative_strides_array_p (orig_decl);
Is the if()if()if() cascade really needed? I can see a reason that an extra 'if' is preferred for the variable declaration of orig_decl, but can't we at least put the new 'orig_decl != expr' with an '&&' into the same if as the decl/in the second if? Besides clearer, it also avoids further identing the return line. Thanks, Tobias ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955