This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
gfortran compiler behavior with module code
- From: Uttam Pawar <uttamp at us dot ibm dot com>
- To: fortran at gcc dot gnu dot org
- Date: Thu, 27 Oct 2005 17:04:13 -0700
- Subject: gfortran compiler behavior with module code
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