Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid code in dtio_22.f90 #17

Closed
nncarlson opened this issue Feb 4, 2018 · 3 comments
Closed

Invalid code in dtio_22.f90 #17

nncarlson opened this issue Feb 4, 2018 · 3 comments
Assignees

Comments

@nncarlson
Copy link
Owner

The interface for the WRITE(FORMATTED) procedure does not conform to the required interface (see F08 9.6.4.8.3). The NAG compiler catches this error. Here is a patch:

diff --git a/dtio_22.f90 b/dtio_22.f90
index d0fb76c..8e5a395 100644
--- a/dtio_22.f90
+++ b/dtio_22.f90
@@ -15,10 +15,10 @@ contains
   subroutine wf(this, unit, b, c, iostat, iomsg)
     class(t), intent(in) :: this
     integer, intent(in) :: unit
-    character, intent(in) :: b
+    character(*), intent(in) :: b
     integer, intent(in) :: c(:)
     integer, intent(out) :: iostat
-    character, intent(inout) :: iomsg
+    character(*), intent(inout) :: iomsg
     write (unit, "(i3)", IOSTAT=iostat, IOMSG=iomsg) this%i
   end subroutine
 end
@janusw
Copy link
Collaborator

janusw commented Feb 15, 2018

See check_dtio_interface1 and check_dtio_arg_TKR_intent in interface.c. Apparently we're checking TKR and INTENT, but miss out on the character length.

@janusw
Copy link
Collaborator

janusw commented Feb 15, 2018

@janusw janusw self-assigned this Feb 15, 2018
@janusw
Copy link
Collaborator

janusw commented Feb 15, 2018

Fixed with 2707b5a.

@janusw janusw closed this as completed Feb 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants