{ dg-options "-O2 -Wall" }
{ dg-require-effective-target alloca } */
+/* pr102706: disabled warnings because the now-disabled conditions for the
+ bogus warnings to come up do not take cost analysis into account, and often
+ come up wrong. */
+/* { dg-additional-options "-Wno-stringop-overflow" } */
+
typedef __INT16_TYPE__ int16_t;
typedef __INT32_TYPE__ int32_t;
static void warn_ax_local_buf (struct AX *p)
{
- p->ax[0] = 4; p->ax[1] = 5; // { dg-warning "\\\[-Wstringop-overflow" "pr102706" { target { vect_slp_v2hi_store_align && { ! vect_slp_v4hi_store_unalign } } } }
+ p->ax[0] = 4; p->ax[1] = 5; // { dg-bogus "\\\[-Wstringop-overflow" "pr102706" }
+ // { xfail { vect_slp_v2hi_store_align && { ! vect_slp_v4hi_store_unalign } } }
p->ax[2] = 6; // { dg-warning "\\\[-Warray-bounds" }
p->ax[3] = 7; // { dg-warning "\\\[-Warray-bounds" }
static void warn_a0_local_buf (struct A0 *p)
{
- p->a0[0] = 4; p->a0[1] = 5; // { dg-warning "\\\[-Wstringop-overflow" "pr102706" { target { vect_slp_v2hi_store_align && { ! vect_slp_v4hi_store_unalign } } } }
+ p->a0[0] = 4; p->a0[1] = 5; // { dg-bogus "\\\[-Wstringop-overflow" "pr102706" }
+ // { xfail { vect_slp_v2hi_store_align && { ! vect_slp_v4hi_store_unalign } } }
p->a0[2] = 6; // { dg-warning "\\\[-Warray-bounds" }
p->a0[3] = 7; // { dg-warning "\\\[-Warray-bounds" }
{ dg-do compile }
{ dg-options "-O2 -Wall" } */
+/* pr102706: disabled warnings because the now-disabled conditions for the
+ bogus warnings to come up do not take cost analysis into account, and often
+ come up wrong. */
+/* { dg-additional-options "-Wno-stringop-overflow" } */
+
void sink (void*);
struct A { int i; };
p->b1.a[ 1].i = 0; // { dg-warning "\\\[-Wzero-length-bounds" }
sink (p);
- p->b2.a[ 0].i = 0; // { dg-warning "\\\[-Wstringop-overflow" "pr102706" { target { vect_slp_v2si_store_align && { ! vect_slp_v4si_store_unalign } } } }
+ p->b2.a[ 0].i = 0; // { dg-bogus "\\\[-Wstringop-overflow" "pr102706" }
+ // { xfail { vect_slp_v2si_store_align && { ! vect_slp_v4si_store_unalign } } }
p->b2.a[ 1].i = 0;
p->b2.a[ 2].i = 0; // { dg-warning "\\\[-Warray-bounds" }
p->b2.a[ 3].i = 0; // { dg-warning "\\\[-Warray-bounds" }
p->b1.a[ 1].i = 8; // { dg-warning "\\\[-Wzero-length-bounds" }
sink (p);
- p->b2.a[ 0].i = 9;
+ p->b2.a[ 0].i = 9; // { dg-bogus "\\\[-Wstringop-overflow" "pr102706" }
+ // { xfail { vect_slp_v2si_store_align && { ! vect_slp_v4si_store_unalign } } }
p->b2.a[ 1].i = 10;
p->b2.a[ 2].i = 11; // { dg-warning "\\\[-Warray-bounds" }
p->b2.a[ 3].i = 12; // { dg-warning "\\\[-Warray-bounds" }