Open vfdff opened 2 years ago
while gfortran doesn't delete the initializtion in following smart case . https://godbolt.org/z/oenTK4rMn
subroutine t(v, row, col)
integer :: row
integer :: col
integer(8) :: v (row, col)
v = 2 // initializtion all elements
end
Base the following code, all the pointer malloced are not used outside the function, so all of them are dead code. We'll see that gfortran will delete the dead code the the very early tree-dump, and only leave 3 movl to retrun the arguments(reference to https://godbolt.org/z/3dMc1n1x1). while flang doen't do similar optimization.