- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
At the moment I really don't know how to explain this without you having all the code and the makefile. So I've attached a tarball with the code and makefile. Simply untar it; cd into the bug directory and do 'make'. Everything compiles just fine, but complains in the link phase with:
obj/class_Pair_String_integer.o:(.bss+0x480): multiple definition of `SETUP$BLK.var$179'
obj/class_Pair_integer_integer.o:(.bss+0x468): first defined here
ld: Warning: size of symbol `SETUP$BLK.var$179' changed from 12 in obj/class_Pair_integer_integer.o to 140 in obj/class_Pair_String_integer.o
obj/class_String.o:(.data+0xde8): multiple definition of `SETUP$BLK.var$244'
obj/class_HashTable_Srn_LitSrn_Lit.o:(.data+0xc48): first defined here
The strange thing is that the SETUP function is within a contains block of init* functions (* meaning wildcard) of the modules and so should only be within those scopes. Both pgfortran and gfortran compile this without a problem. I haven't tried g95 yet. Any ideas? Many thanks in advance.
-David
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok. Tried the g95 compiler and no problems with the build. Any help is greatly appreciated. Thanks.
-David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have escalated this as issue DPD200150915.
The problem occurs when a contained routine does an ALLOCATE of a derived type variable that has initializers. The compiler generates a chunk of data which it will copy in as the initial value and assigns it a global name. Unfortunately, it chooses the name of the contained routine to "qualify" the global name rather than that of the outermost scope, and this is not guaranteed to be unique.
Given your use of include files to construct these routines, I'm not sure what I can suggest as a workaround.
I will update this thread when I hear it has been fixed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is fixed for our next major release, due late this year.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page