fortls
fortls copied to clipboard
Preprocessor variable declared twice
Describe the bug
The variable real_t should not throw a diagnostic error
To Reproduce
module mwe
use iso_c_binding, only: c_int32_t, c_int64_t, c_double, c_float
#define REALTYPEWIDTH 32
#if REALTYPEWIDTH == 32
integer, parameter, public :: real_t = c_float
#elif REALTYPEWIDTH == 64
integer, parameter, public :: real_t = c_double
#else
#error "Incorrect user-supplied value for REALTYPEWIDTH"
#endif
implicit none
private
end module mwe
Expected behavior No diagnostic errors