https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85786
--- Comment #2 from Angus Gibson <angus at agibson dot me> --- Changing the declaration of e to also be 'target', and associating the pointer: CS%v(2)%p => e if (query_ptr(e, CS)) then ... still causes the segfault. Perhaps I disconnected this from the original code too much! Even if CS%v(2)%p wasn't associated, I don't see why there should be a segfault?