- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm having trouble compiling some code that uses function pointers as derived type components. I'm getting a "Code 3" compiler error. I'm able to recreate the problem withthe simple 16 line test codebelow -- the test program compiles fine with g95. (I didn't specify interfaces for the procedure pointers, as when I start doing that I run into a different compiler error, which I believe has already been discussed on this forum).
This is my first post, so let me know if I need to provide more information.
Thanks.
[cpp]PROGRAM farg TYPE container PROCEDURE(), POINTER, nopass :: f PROCEDURE(), POINTER, nopass :: g END TYPE container PRINT*, 'Running program that does nothing' CONTAINS SUBROUTINE setf(cont, func) TYPE(container) :: cont PROCEDURE(), POINTER :: func func => cont%f END SUBROUTINE setf END PROGRAM farg[/cpp]
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Welcome to the forum and thanks for the bug report. I can reproduce this and will pass it on to the developers. Our issue number is DPD200110430.
![](/skins/images/895D6060305DF45A57FACF854B5A8CD1/responsive_peak/images/icon_anonymous_message.png)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page