https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57160
--- Comment #14 from janus at gcc dot gnu.org --- Author: janus Date: Fri Aug 10 14:08:53 2018 New Revision: 263471 URL: https://gcc.gnu.org/viewcvs?rev=263471&root=gcc&view=rev Log: 2018-08-10 Janus Weil <ja...@gcc.gnu.org> PR fortran/57160 * invoke.texi (frontend-optimize): Mention short-circuiting. * options.c (gfc_post_options): Disable -ffrontend-optimize with -Og. * resolve.c (resolve_operator): Warn about short-circuiting only with -ffrontend-optimize. * trans-expr.c (gfc_conv_expr_op): Use short-circuiting operators only with -ffrontend-optimize. Without that flag, make sure that both operands are evaluated. 2018-08-10 Janus Weil <ja...@gcc.gnu.org> PR fortran/57160 * gfortran.dg/actual_pointer_function_1.f90: Fix invalid test case. * gfortran.dg/inline_matmul_23.f90: Add option "-ffrontend-optimize". * gfortran.dg/short_circuiting_2.f90: New test case. * gfortran.dg/short_circuiting_3.f90: New test case. Added: trunk/gcc/testsuite/gfortran.dg/short_circuiting_2.f90 trunk/gcc/testsuite/gfortran.dg/short_circuiting_3.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/invoke.texi trunk/gcc/fortran/options.c trunk/gcc/fortran/resolve.c trunk/gcc/fortran/trans-expr.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gfortran.dg/actual_pointer_function_1.f90 trunk/gcc/testsuite/gfortran.dg/inline_matmul_23.f90