Re: [PATCH, testsuite, ARM] Change to expected failure for g++.dg/abi/local1.C on ARM target

2011-09-19 Thread Jason Merrill

On 09/13/2011 09:29 PM, Jiangning Liu wrote:

In "C++ ABI for the ARM architecture", it says,



This runs contrary to §2.9.1 of [GC++ABI] which states:

It is intended that two type_info pointers point to equivalent type
descriptions if and only if the pointers are equal. An implementation must
satisfy this constraint, e.g. by using symbol preemption, COMDAT sections,
or other mechanisms.

Fortunately, we can ignore this requirement without violating the C++
standard provided that:

* type_info::operator== and type_info::operator!= compare the strings
returned by type_info::name(), not just the pointers to the RTTI objects and
their names.

* No reliance is placed on the address returned by type_info::name(). (That
is, t1.name() != t2.name() does not imply that t1 != t2).




This test is not specific to the normal C++ ABI, it's standard C++; if 
it fails on ARM EABI targets, that's a bug that should be fixed, 
probably using the same initial '*' trick that we use on other platforms.


Jason


Re: [PATCH, testsuite, ARM] Change to expected failure for g++.dg/abi/local1.C on ARM target

2011-09-14 Thread Joseph S. Myers
On Wed, 14 Sep 2011, Jiangning Liu wrote:

> +// { dg-do run { xfail { arm*-*-eabi* } } }

That's specific to bare-metal targets rather than all ARM EABI (such as 
arm-none-linux-gnueabi or arm-none-symbianelf), is that your intent?  If 
you wanted to cover all ARM EABI targets you'd use the arm_eabi 
effective-target.  But maybe you actually want a new effective-target 
keyword for targets defining __GXX_TYPEINFO_EQUALITY_INLINE to 0 rather 
than just ARM EABI?  I've seen this test fail on i686-mingw32 and 
m68k-uclinux as well.

-- 
Joseph S. Myers
jos...@codesourcery.com


[PATCH, testsuite, ARM] Change to expected failure for g++.dg/abi/local1.C on ARM target

2011-09-13 Thread Jiangning Liu
Here comes a patch to change the case g++.dg/abi/local1.C to be expected
failure for ARM target.

In "C++ ABI for the ARM architecture", it says,



This runs contrary to §2.9.1 of [GC++ABI] which states:

It is intended that two type_info pointers point to equivalent type
descriptions if and only if the pointers are equal. An implementation must
satisfy this constraint, e.g. by using symbol preemption, COMDAT sections,
or other mechanisms.

Fortunately, we can ignore this requirement without violating the C++
standard provided that:

* type_info::operator== and type_info::operator!= compare the strings
returned by type_info::name(), not just the pointers to the RTTI objects and
their names.

* No reliance is placed on the address returned by type_info::name(). (That
is, t1.name() != t2.name() does not imply that t1 != t2).



The patch is,

diff --git a/gcc/testsuite/g++.dg/abi/local1.C
b/gcc/testsuite/g++.dg/abi/local1.C
index 518193c..7f08a8f 100644
--- a/gcc/testsuite/g++.dg/abi/local1.C
+++ b/gcc/testsuite/g++.dg/abi/local1.C
@@ -1,4 +1,4 @@
-// { dg-do run }
+// { dg-do run { xfail { arm*-*-eabi* } } }
 // { dg-additional-sources "local1-a.cc" }
 
 #include 

ChangeLog:

2011-09-14  Jiangning Liu  

* g++.dg/abi/local1.C: Change to XFAIL for ARM EABI target.

Thanks,
-Jiangning