https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108384
--- Comment #11 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #10) > If it is __builtin_clear_padding only, I'll have a look... After the __builtin_clear_padding is exposed and before the IPA passes, the IR looks like: l_26[1].f0 = 4; MEM <long int> [(struct S0[2] *)&l_26 + 16B] = 25770065925; func_23 (l_26[1], func_2_l_27); So here is another testcase which you can reproduce it with -O3 -fno-strict-aliasing (because I voilate aliasing rules to get a similar enough IR): ``` struct S0 { int f0; short f1; unsigned f2 : 7; short f3; } func_2_l_27; int *g_389; int safe_sub_func_int16_t_s_s(void); void safe_lshift_func_uint8_t_u_s(int); void func_23(struct S0 p_24, struct S0 p_25) { int *l_1051 = g_389; if (safe_sub_func_int16_t_s_s()) for (;;) safe_lshift_func_uint8_t_u_s(p_24.f1); *l_1051 = p_25.f0; } void func_2(void) { struct S0 l_26[2]; l_26[1].f0 = 4; ((long long*)&l_26)[2] = 25770065925; func_23(l_26[1], func_2_l_27); } ```