- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am getting critical errors with weight 100 for allocating an array with zero size.
example:
[fortran]
allocatable a(:)
allocate(a(0))
end
[/fortran]
[plain]
P1: Critical: Insufficient memory
zeroarray.f90(2): error #12138: size of allocated memory (0 bytes) is smaller than required to hold the object "A[]" (4 bytes)
Problem P1.1: Insufficient memory: New
zeroarray.f90(2): error #12138: size of allocated memory (0 bytes) is smaller than required to hold the object "A[]" (4 bytes)
X1: Allocation site: /home/lada/f/testy/intel/zeroarray.f90(2): Function MAIN_
Code snippet:
1 allocatable a(:)
>2 allocate(a(0))
3 end
4
Stack (1 of 1 instance(s))
>Unknown!MAIN_ - /home/lada/f/testy/intel/zeroarray.f90:2[/plain]
I believe this usage of allocatable arrays is completely legitimate.
Link Copied
- 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
- 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