https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105801
Bug ID: 105801
Summary: Missed CCP with -ftrivial-auto-var-init=zero
Product: gcc
Version: 12.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: rguenth at gcc dot gnu.org
Target Milestone: ---
int foo (int flag)
{
int i;
if (flag)
i = 1;
return i;
}
CCP used to optimize this to 'return 1;' but with -ftrivial-auto-var-init=zero
only FRE does this now.
