On these platforms, one of the instances of the constructor generated in
test_strcpy_bounds_memarray_range is put into the constant pool so the strlen
pass cannot do its magic.
Tested on visium-elf, SPARC64 and x86-64/Linux, applied on the mainline.
2018-01-16 Eric Botcazou <ebotca...@adacore.com>
* c-c++-common/Warray-bounds-4.c (test_strcpy_bounds_memarray_range):
XFAIL last test on SPARC and Visium.
--
Eric Botcazou
Index: c-c++-common/Warray-bounds-4.c
===================================================================
--- c-c++-common/Warray-bounds-4.c (revision 256562)
+++ c-c++-common/Warray-bounds-4.c (working copy)
@@ -64,5 +64,5 @@ void test_strcpy_bounds_memarray_range (
TM ("01", "", ma.a5 + i, ma.a5);
TM ("012", "", ma.a5 + i, ma.a5);
TM ("0123", "", ma.a5 + i, ma.a5); /* { dg-warning "offset 6 from the object at .ma. is out of the bounds of referenced subobject .a5. with type .char\\\[5]. at offset 0" "strcpy" { xfail *-*-* } } */
- TM ("", "012345", ma.a7 + i, ma.a7); /* { dg-warning "offset 13 from the object at .ma. is out of the bounds of referenced subobject .\(MA::\)?a7. with type .char ?\\\[7]. at offset 5" } */
+ TM ("", "012345", ma.a7 + i, ma.a7); /* { dg-warning "offset 13 from the object at .ma. is out of the bounds of referenced subobject .\(MA::\)?a7. with type .char ?\\\[7]. at offset 5" "strcpy" { xfail sparc*-*-* visium-*-* } } */
}