https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106565
--- Comment #2 from Quanhua Liu <quanhua.liu at noaa dot gov> --- I modified the application code (see below) and use the "method" as a control variable from command line. I use the same code for both gfortran 10.3.0 and ifort 19.0.5.281 gfortran -O3 matrixCal.f90 time a.out 1 time a.out 2 ifort -O3 matrixCal.f90 time a.out 1 time a.out 2 where method 1, C = matmul(A, transpose(B) ) method 2, BB = transpose(B), C = matmul(A, BB) The timing is given in the table below. As you can see, using gfortran, method '2' is 6 times faster than the method '1'. Using ifort, method '2' is very similar to the method '1'. '1' is slightly fast because '2' may copy B to BB. Timing compiler gfortran ifort method 1 2 1 2 real 6.28 0.79 0.80 0.83