https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105012
--- Comment #12 from Richard Biener <rguenth at gcc dot gnu.org> --- erfcx_r4 = {CLOBBER}; calerf_r4 ((real(kind=4) *) x, &__result_erfcx_r4(address-taken), &jint(address-taken)); hints at that gfortran somehow knows that it should pass the result but it still somehow clobbers the function itself!? So maybe not wrong-code but missed-optimization. The operand scanner has case FUNCTION_DECL: case LABEL_DECL: case CASE_LABEL_EXPR: /* Expressions that make no memory references. */ return; where it does not assign virtual operands to FUNCTION_DECLs. It's probably good to make DSE more forgiving here. I'm testing such workaround.