https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68277
--- Comment #7 from Kazumoto Kojima <kkojima at gcc dot gnu.org> --- (In reply to Kazumoto Kojima from comment #6) I've changed the predicate of the 2nd operand to arith_operand instead of const_int_operand in your patch and run testsuite. There is one new failure: FAIL: gfortran.dg/pr65450.f90 -O3 -g execution test which is Program received signal SIGSEGV: Segmentation fault - invalid memory reference. Weird. I'm afraid that even my first patch makes wrong codes silently, though it doesn't fail for the above test.