https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105012
--- Comment #20 from Richard Biener <rguenth at gcc dot gnu.org> --- With your patch I still see __attribute__((fn spec (". r "))) real(kind=8) derfc (real(kind=8) & restrict x) { integer(kind=4) jint; real(kind=8) __result_derfc; derfc = {CLOBBER}; calerf_r8 ((real(kind=8) *) x, &__result_derfc, &jint); return __result_derfc; I think the patch wouldn't adjust what the clobber is added to but only whether it is added, but it seems it fails to catch this case? So maybe the error is elsewhere. Note with my testcase from comment#11 fixed as you suggest I don't see a clobber at all - I probably simplified too much and gfortran needs the wrapped module to see the intent(out).