- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I am in a software package submission process, and when I undertake it I get the following warning that prevents me to complete it:
use numbers_utils | 1 Warning: Type specified for intrinsic function ‘size’ at (1) is ignored [-Wsurprising]
In particular, I have overloaded the intrinsic function "size" in the module "types", that I import into "numbers_utils". The definition of the overloaded interface follows:
interface size
module procedure number__size
module procedure graph__size
end interface size
...
pure function number__size (x) result(sz)
implicit none
type(number), intent(in) :: x
integer :: sz
sz = 0
if (is_allocated(x)) sz = product(x%shp)
end function number__size
pure function graph__size (x) result(sz)
implicit none
type(graph), intent(in) :: x
integer :: sz
sz = 0
if (is_allocated(x)) sz = size(x%nodes)
end function graph__size
I am compiling with "gfortran" version 7.5.0 on Ubuntu 18.04, and am not able to reproduce the warning on my environment and not even a couple of VM that I have running on AWS. The submission process runs on a Debian server. As quick fix I will avoid the overloading which I think it is what is causing the problem. However I would be glad if someone could point me towards the actual cause of this warning, so as to correctly write the overloaded interface in the future.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your question is about a gFortran compiler option. Intel Fortran does not have that option. Please ask in an appropriate forum.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your question is about a gFortran compiler option. Intel Fortran does not have that option. Please ask in an appropriate forum.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page