Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Warning #7334

bbeyer
Novice
693 Views
I am using Intel Compiler 12.0 and have turned on the "Warn for Non-Standard Fortran" switch (/stand:f03) and received over 30,000 warnings many of which are #7334. The following code sample replicates the problem causing thewarning: (warning #7334: F2003 component is being referenced as if it were a structure type; this is not standard Fortran 2003. [ARRAY]). The warning refers to using ARRAY(J).X =. Can someone clarify what the problem is and how this can be fixed? Thanks.

IMPLICIT NONE

INTEGER(4) J

TYPE A
REAL(8) X
END TYPE
TYPE(A) ARRAY(10)
!
DO J = 1,10
ARRAY(J).X = DBLE(J**2)
WRITE(*,*) ARRAY(J)
ENDDO

END

0 Kudos
3 Replies
Les_Neilson
Valued Contributor II
693 Views
Replace the "dot" with %

ARRAY(J)%X = etc

Les
0 Kudos
bbeyer
Novice
693 Views

Thank you Les, thatexplains it.

0 Kudos
Steven_L_Intel1
Employee
693 Views
To clarify - the dot comes from the DEC Fortran STRUCTURE/RECORD extension circa 1985. Later, Fortran 90 added derived types which were similar, and the % character was used as a field separator. Intel Fortran generally treats these as equivalent, with some exceptions. A lot of people think the use of dot is "prettier", but it is non-standard and sometimes leads to parsing ambiguity in combination with newer language features.
0 Kudos
Reply