https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79073
Bug ID: 79073
Summary: FAIL: gcc.dg/pr78973.c (test for warnings, line 12)
in ILP32
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: testsuite
Assignee: unassigned at gcc dot gnu.org
Reporter: msebor at gcc dot gnu.org
Target Milestone: ---
As noted in pr78775 comment 10, the pr78973.c test added in r244290 fails on
ILP32 targets:
Running /src/gcc/git/gcc/testsuite/gcc.dg/dg.exp ...
FAIL: gcc.dg/pr78973.c (test for warnings, line 12)
=== gcc Summary ===
# of expected passes 1
# of unexpected failures 1
/home/msebor/build/gcc-git/gcc/xgcc version 7.0.0 20170112 (experimental)
(GCC)
The failure seems to be due to the lack or range information for the last
memset argument in ILP32. The VRP details dump shows the range information is
computed:
SSA form after inserting ASSERT_EXPRs
...
n_11 = ASSERT_EXPR <n_3(D), n_3(D) + 2147483648 <= 2147483647>;
__builtin_memset (d_5(D), 0, n_11);
...
but then somehow not preserved for the n_3(D) argument:
Value ranges after VRP:
n_3(D): VARYING
n_11: [2147483648, +INF] EQUIVALENCES: { n_3(D) } (1 elements)
...
__builtin_memset (d_5(D), 0, n_3(D));
This seems like a defect/limitation in GCC, not one in the test, so I'll open a
separate bug for it and xfail the test until the defect is fixed.