https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48655

--- Comment #7 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
From pr86313, the test

program p
   integer :: f
   integer, dimension(1:3) :: u
   f = 1
   u = f + (/0, 1, 2/)
   print *, u
end

gives a warning at compile time with -ffrontend-optimize, but not without (no
warning at run time):

% gfca pr86313_2.f90 -Warray-temporaries -fcheck=array-temps
-ffrontend-optimize
pr86313_2.f90:5:7:

    5 |    u = f + (/0, 1, 2/)
      |       1
Warning: Creating array temporary at (1) [-Warray-temporaries]
% ./a.out
           1           2           3
% gfca pr86313_2.f90 -Warray-temporaries -fcheck=array-temps 
%

Reply via email to