https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124475
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Have you tried the trunk? Main is treated special also before gcc 16, ut is treated as call once. So this might be fixed differently. Also seems like this could be const prop sra and const prop to get a fix. What you are asking with WholeProgramDevirt is different. Try adding noclone also. But llvm I dont think understands noclone.
