It's what is extraneous, not missing. Remove the C attribute which does not apply to variables.
But may I suggest the following, standard-conforming variation?
MODULE MYVARS USE, INTRINSIC :: ISO_C_BINDING REAL(C_FLOAT), BIND(C) :: TEST(2) END MODULE MYVARS SUBROUTINE INITIAL_TEST_DATA() USE MYVARS IMPLICIT NONE TEST(1) = 11.5 RETURN END



Using !DEC$ ATTRIBUTES C, EXTERN directive for arrays
All,
I am unable to get the code below to compile as a static library. I declare the TEST variable as a C external real array (dimension 2). No problem there, but, when I try to set the first element of TEST to 11.5, I get "Error: Conflicting attributes or multiple declaration of name. [TEST]". It's as if the compiler sees my assignment statement as a declration or it doesn't know that it's an array...what am I missing here? Thanks much in advance!
SUBROUTINE INITIAL_TEST_DATA()
IMPLICIT NONE
REAL TEST(2)
!DEC$ ATTRIBUTES C, EXTERN :: TEST
TEST(1) = 11.5
RETURN
END