https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103931
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Also it looks like it is only intrinsic module ISO_C_BINDING which is showing this issue. I tried defining a new module T which had a type of yy and replace ISO_C_BINDING with T and C_PTR with yy (and remove intrinsic) and it worked.