https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123855
--- Comment #3 from Jørgen Kvalsvik <j at lambda dot is> --- Created attachment 63517 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63517&action=edit Fix by guarding SSA_NAME_DEF_STMT I posted this fix on the mailing list, which fixes the test for me. $ gcov -t --prime-paths-source gcov-pr123855 -: 3:__attribute__((__returns_twice__)) void paths covered 0 of 2 path 0 not covered: BB 2: 4:foo () BB 2: 6: foo (); path 1 not covered: BB 4: 7: for (;;) BB 4: 7: for (;;) #####: 4:foo () -: 5:{ #####: 6: foo (); #####: 7: for (;;) -: 8: ; -: 9:} -: 10:
