https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110420
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Known to work| |11.1.0, 11.4.0 Known to fail| |12.1.0 Ever confirmed|0 |1 Summary|[14 Regression] internal |[12/13/14 Regression] |compiler error: in |internal compiler error: in |gimple_redirect_edge_and_br |gimple_redirect_edge_and_br |anch, at tree-cfg.cc:6262 |anch, at tree-cfg.cc:6262 Last reconfirmed| |2023-06-26 Target Milestone|14.0 |13.2 Status|UNCONFIRMED |NEW --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Reduced testcase that shows this is a regression in GCC 12+: ``` static int t; void g(void); void f(void) { int __gu_val; asm goto("" : "=&r"(__gu_val) : : : Efault); t = __gu_val; g(); Efault: } ``` simple_dce_from_worklist is removing the statement (in this case during inline but in the original case it was during ccp1 but it was the same issue). ``` Removing statement, writes to write only var: # .MEM_4 = VDEF <.MEM_3(D)> t = __gu_val_2; Removing dead stmt:__asm__ goto("" : "=&r" __gu_val_2 : : : "Efault" Efault); ```