https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120049
--- Comment #22 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> --- I forgot to mention that when you flip the test example around: print *, c_associated(42, c_loc(val)) It also gives an internal error. So I am taking care of it as well.