flang
flang copied to clipboard
common define alias fail when compiled with flang at O1 or above
trafficstars
MODULE bar INTEGER :: i COMMON /X/i contains END MODULE bar
USE bar INTEGER :: j,k COMMON /X/j i = 89 j = 1 k = i if (j /= i) then print *, i, j, k STOP 1 endif END
$flang common.f90 -O1 $./a.out 1 1 89 1 $gfortran common.f90 -O1 $./a.out
The problem may be in constant propagation