- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
i was placing some routines in submodules, when i stumbled upon this error:
error #7371: An object in a COMMON block with DEC$ ATTRIBUTES DLLIMPORT cannot be initialized. [BAR]
Reproducer:
module M_TEST implicit none interface module real function foo() !DIR$ ATTRIBUTES DLLEXPORT,ALIAS:"foo" :: foo end function end interface end module submodule(M_TEST) M_TEST_S implicit none contains module real function foo() !DIR$ ATTRIBUTES DLLEXPORT :: foo real, save :: bar = 1.0 ! Explicit save not required for error foo = 1.0 end function end submodule
Compiler: 16.3.207
Options: /dll /nologo
Best regards,
Wolf
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for reporting the issue. I have reproduced it and opened a defect report DPD200413429 for it.
Thanks,
Xiaoping Duan
Intel Customer Support
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