------- Additional Comments From steven at gcc dot gnu dot org 2005-08-01 00:20 ------- Slightly smaller yet: program test_elemental implicit none integer, parameter :: N = 6 integer(kind = 4), dimension (N) :: a integer(kind = 4), dimension (N) :: b a = 2 b = e_fn (2, 0) a = e_fn (a(N:1:-1), b) if (a(6) /= 0) call abort contains elemental integer function e_fn (p, q) implicit none integer, intent(in) :: p, q e_fn = p - q end function end program Fails with -O2 -funroll-loops. Also fails with -O2 -funroll-loops -fno-strict-aliasing.
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22509