- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve,
A month or so ago there was a thread about using allocatable arrays in derived types (click here). In one of your contributions to this thread you said: "In the case of allocatable or pointer array components of derived type, a temporary may be made."
My code makes a heavy use of allocatable arrays within nested derived types, due to a fairly complex set of input data. I have for instance allocatable arrays of derived-type variables, which in turn also have derived type components. A simple example would be A(i)%B(C(j)%D(k)) = p, for instance.
Can you elaborate a bit more on the "may" in your answer? Also, does the /check:arg_temp_created run-time option work for derived type structures?
Is a temporary only created when some part of the derived type variable is assigned a value? If I only use the derived type variable as an input, would a temporary be created?
Thanks,
Olivier
Link Copied
- 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