gfortran compiler behavior with module code
Uttam Pawar
uttamp@us.ibm.com
Fri Oct 28 00:07:00 GMT 2005
Hi,
Following code compiles fine with gfortran (gcc version 4.1.0 20051018)
$ cat module_test.f90
MODULE module_name
TYPE POINT
PRIVATE
REAL :: X, Y
END TYPE POINT
END MODULE module_name
TYPE TRIANGLE
TYPE (POINT) :: A, B
END TYPE TRIANGLE
END
$ gfortran -std=f95 module_test.f90
no errors.
But when I test this code with lahey conformance checker I get
following, (LF95 and Fortran 90/95 conformance check boxes selected)
Compiling program unit main at line 7:
1600-S: "SOURCE.F90", line 8: No component defined in derived type definition for 'TRIANGLE'.
1173-S: "SOURCE.F90", line 9: Derived type definition for 'POINT' missing.
1498-S: "SOURCE.F90", line 9, column 12: 'POINT' invalid as derived type name.
Encountered 3 errors, 0 warnings, 0 informations in file SOURCE.F90.
Which is a correct?
Thanks in advance.
- Uttam
More information about the Fortran
mailing list