When given the following code:
MODULE test_m
REAL :: module_var
CONTAINS
PURE SUBROUTINE test()
ASSOCIATE(var => module_var)
END ASSOCIATE
END SUBROUTINE test
END MODULE test_m
Flang wrongly announces an error:
./test.f90:14:17: error: A pure subprogram may not have a variable with the SAVE attribute
ASSOCIATE(var => module_var)
^^^
But test is a valid PURE subroutine since var is not assigned to. Version information:
flang version 20.1.0 (https://github.com/llvm/llvm-project.git 24a30daaa559829ad079f2ff7f73eb4e18095f88)
Target: x86_64-unknown-linux-gnu
Thread model: posix