Hi Janus, after Tobias' approval, two remarks:
One thing that you can do is to change this to + if (unlikely(source->base_addr == NULL)) + return NULL; to minimize the runtime impact. As for a test case, a lot of test cases in class_optional_2.f90 are commented out. Some of these could probably be uncommented now, but it is not too urgent now. Regards Thomas