Even with version:
Intel(R) Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 126.96.36.199 Build 20181018
this old bug was not fixed.
Gfortran v. 8.2.1 compiles all right and gives the correct result.
Indeed, also Update2 of v19 has no fix for this. Both nagfor and gfortran compile this without issues, pgfortran also throws a syntax error.
I will check the status of this issue.
For more complete information about compiler optimizations, see our Optimization Notice.