Last active
April 4, 2016 07:57
-
-
Save pletnes/ba5178b5e89f92a07ae2d024d5bf456f to your computer and use it in GitHub Desktop.
Makefile and code - illegal fortran syntax?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .PHONY: all pgi intel gcc nag clean | |
| all: gcc intel nag pgi | |
| pgi: | |
| pgfortran -V | |
| pgfortran -Minform=inform -Mbounds intertest.f90 -o intertest-pgi | |
| ./intertest-pgi | |
| intel: | |
| ifort -V | |
| ifort -warn -check intertest.f90 -o intertest-intel | |
| ./intertest-intel | |
| nag: | |
| nagfor -V | |
| nagfor intertest.f90 -o intertest-nag | |
| ./intertest-nag | |
| gcc: | |
| gcc --version | |
| gfortran -Wall -Wextra -fcheck=all intertest.f90 -o intertest-gcc | |
| ./intertest-gcc | |
| clean: | |
| rm -f *.mod intertest-pgi intertest-gcc intertest-intel |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
module intertest implicit none type beta real :: val end type beta interface beta module procedure :: beta_constructor end interface beta contains function beta_constructor(val) result(this) implicit none type(beta) :: this real, intent(in) :: val this%val = val end function beta_constructor end module intertest program test_interface use intertest implicit none type(beta) :: b b = beta(3.14) print *, "If this prints 3.14, all is OK: ", b%val end program test_interface