https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102697
--- Comment #1 from Hongtao.liu <crazylht at gmail dot com> ---
Change i to 0, still missing warning after vectorization
before vectorization
void max_B6_B4 (int i, struct B4_B6 * pb4_b6)
{
char * d;
char * q;
char * p;
<bb 2> [local count: 1073741824]:
[../test4.c:10:7] p_2 = [../test4.c:10:11] &[../test4.c:10:17]
pb4_b6_1(D)->b6;
[../test4.c:11:7] q_3 = [../test4.c:11:11] &[../test4.c:11:17]
pb4_b6_1(D)->b4;
[../test4.c:12:9] d_4 = MAX_EXPR <p_2, q_3>;
[../test4.c:14:8] MEM <unsigned int> [(char *)d_4 + 3B] = 0;
[../test4.c:18:1] return;
after vectorization:
;; Function max_B6_B4 (max_B6_B4, funcdef_no=0, decl_uid=4060, cgraph_uid=1,
symbol_order=0)
void max_B6_B4 (int i, struct B4_B6 * pb4_b6)
{
char * d;
char * q;
char * p;
<bb 2> [local count: 1073741824]:
[test4.c:10:7] p_2 = [test4.c:10:11] &[test4.c:10:17] pb4_b6_1(D)->b6;
[test4.c:11:7] q_3 = [test4.c:11:11] &[test4.c:11:17] pb4_b6_1(D)->b4;
[test4.c:12:9] d_4 = MAX_EXPR <p_2, q_3>;
[test4.c:14:8] MEM <vector(4) char> [(char *)d_4 + 3B] = { 0, 0, 0, 0 };
[test4.c:18:1] return;
}
It looks like a false negative for -Wstringop-overflow=