https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110896
Bug ID: 110896
Summary: [12/13/14 Regression] gcc.dg/ubsan/pr81981.c is
xfailed
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Keywords: diagnostic, xfail
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: pinskia at gcc dot gnu.org
Blocks: 24639
Target Milestone: ---
The original issue in PR 81981 is fixed. The problem here is we don't even warn
without -fsanitize=undefined too.
Testcase from that PR:
```
int foo (int i)
{
int t[1], u[1];
int n = 0;
if (i)
{
t[n] = i;
u[0] = i;
}
return t[0] + u[0];
}
```
we don't warn about `u[0]` being unintinialized with just `-O2 -Wall -Wextra`
starting in GCC 12 via r12-4625 (the fix for pr102681). That is the issue is
unrelated to -fsanitize=undefined now.
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24639
[Bug 24639] [meta-bug] bug to track all Wuninitialized issues