diff mbox series

[testsuite] XFAIL Warray-bounds-4.c on SPARC and Visium

Message ID 2165839.SRtgsupJtZ@polaris
State New
Headers show
Series [testsuite] XFAIL Warray-bounds-4.c on SPARC and Visium | expand

Commit Message

Eric Botcazou Jan. 16, 2018, 10:39 p.m. UTC
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  <ebotcazou@adacore.com>

	* c-c++-common/Warray-bounds-4.c (test_strcpy_bounds_memarray_range): 
	XFAIL last test on SPARC and Visium.

Comments

Martin Sebor Jan. 16, 2018, 11:16 p.m. UTC | #1
On 01/16/2018 03:39 PM, Eric Botcazou wrote:
> 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.

Sorry about these lingering failures.  I'm aware of the assertion
failing on a number of targets.  The failure is being tracked in
bug 83462 (along with some others) but I haven't yet gotten around
to dealing with it.  The ideal fix is to have string_constant() get
the string from the constructor (tracked in bug 83543) but it's too
late for such a change now.   It might be easiest to simply skip
the assertion on all non-x86_64 targets.  I'm hoping to get to it
soon.

Martin

>
>
> 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
>
> 	* c-c++-common/Warray-bounds-4.c (test_strcpy_bounds_memarray_range):
> 	XFAIL last test on SPARC and Visium.
>
diff mbox series

Patch

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-*-* } } */
 }