https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074
--- Comment #29 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Sat Feb 16 18:46:04 2019 New Revision: 268962 URL: https://gcc.gnu.org/viewcvs?rev=268962&root=gcc&view=rev Log: PR middle-end/88074 * simplify.c (simplify_transformation_to_array): Run post_op immediately after processing corresponding row, rather than at the end. (norm2_scale): New variable. (add_squared): Rename to ... (norm2_add_squared): ... this. Scale down operand and/or result if needed. (do_sqrt): Rename to ... (norm2_do_sqrt): ... this. Handle the result == e case. Scale up result and clear norm2_scale. (gfc_simplify_norm2): Clear norm2_scale. Change add_squared to norm2_add_squared and &do_sqrt to norm2_do_sqrt. Scale up result and clear norm2_scale again. Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/simplify.c