Patchwork [testsuite,ia64] Fix scan-assembler rules for IA64 HP-UX

login
register
mail settings
Submitter Steve Ellcey
Date Nov. 5, 2010, 6:32 p.m.
Message ID <201011051832.oA5IWWV15116@lucas.cup.hp.com>
Download mbox | patch
Permalink /patch/70278/
State New
Headers show

Comments

Steve Ellcey - Nov. 5, 2010, 6:32 p.m.
The scan-assembler checks in gcc/testsuite/g++.dg/abi/covariant1.C and
gcc/testsuite/g++.dg/abi/covariant6.C are not correct for 32 bit mode on
IA64 HP-UX because the ABI specifies using 64 bit pointers in both 32
and 64 bit modes.  Thus the mangled names for the covariant return
thunks in these tests on IA64 HP-UX are the same in both 32 and 64 bit
modes.

This patch changes the scan-assembler rules to reflect this situation.

I tested these on HP-UX with the HP compiler and verified that the
HP compiler is using the same mangling as GCC.

Tested on IA64 HP-UX and Linux and on x86 linux.

OK to checkin?  Perhaps this is obvious and/or target specific
since the change only affects IA64 HP-UX.  I will go ahead
and check the change in if there are no objections.

Steve Ellcey
sje@cup.hp.com



2010-11-05  Steve Ellcey  <sje@cup.hp.com>

	* gcc/testsuite/g++.dg/abi/covariant1.C: Fix scan-assembler.
	* gcc/testsuite/g++.dg/abi/covariant6.C: Ditto.

Patch

Index: gcc/testsuite/g++.dg/abi/covariant1.C
===================================================================
--- gcc/testsuite/g++.dg/abi/covariant1.C	(revision 166346)
+++ gcc/testsuite/g++.dg/abi/covariant1.C	(working copy)
@@ -20,7 +20,7 @@  struct c14 : 
 
 void c14::f() { }
 
-// { dg-final { scan-assembler "_ZTcv0_n12_v0_n16_N3c143f17Ev" { target ilp32 } } }
+// { dg-final { scan-assembler "_ZTcv0_n12_v0_n16_N3c143f17Ev" { target { ilp32  && { ! { ia64-*-hpux* } } } } } }
 // { dg-final { scan-assembler-not "_ZTch0_v0_n16_N3c143f17Ev" } }
-// { dg-final { scan-assembler "_ZTcv0_n24_v0_n32_N3c143f17Ev" { target lp64 } } }
+// { dg-final { scan-assembler "_ZTcv0_n24_v0_n32_N3c143f17Ev" { target { lp64  || { ia64-*-hpux* } } } } }
 // { dg-final { scan-assembler-not "_ZTch0_v0_n32_N3c143f17Ev" } }
Index: gcc/testsuite/g++.dg/abi/covariant6.C
===================================================================
--- gcc/testsuite/g++.dg/abi/covariant6.C	(revision 166346)
+++ gcc/testsuite/g++.dg/abi/covariant6.C	(working copy)
@@ -16,10 +16,10 @@  struct C: B
 C* C::f() { return 0; }
 
 // When we emit C::f, we should emit both thunks: one for B and one for A.
-// { dg-final { scan-assembler "_ZTch0_v0_n16_N1C1fEv" { target ilp32 } } }
-// { dg-final { scan-assembler "_ZTch0_v0_n32_N1C1fEv" { target lp64 } } }
-// { dg-final { scan-assembler "_ZTcv0_n12_v0_n16_N1C1fEv" { target ilp32 } } }
-// { dg-final { scan-assembler "_ZTcv0_n24_v0_n32_N1C1fEv" { target lp64 } } }
+// { dg-final { scan-assembler "_ZTch0_v0_n16_N1C1fEv" { target { ilp32  && { ! { ia64-*-hpux* } } } } } }
+// { dg-final { scan-assembler "_ZTch0_v0_n32_N1C1fEv" { target { lp64  || { ia64-*-hpux* } } } } }
+// { dg-final { scan-assembler "_ZTcv0_n12_v0_n16_N1C1fEv" { target { ilp32  && { ! { ia64-*-hpux* } } } } } }
+// { dg-final { scan-assembler "_ZTcv0_n24_v0_n32_N1C1fEv" { target { lp64  || { ia64-*-hpux* } } } } }
 
 struct D: B
 {
@@ -30,5 +30,5 @@  struct D: B
 void D::dummy() { }
 
 // When we emit the D vtable, it should refer to the thunk for B.
-// { dg-final { scan-assembler "_ZTch0_v0_n16_N1D1fEv" { target ilp32 } } }
-// { dg-final { scan-assembler "_ZTch0_v0_n32_N1D1fEv" { target lp64 } } }
+// { dg-final { scan-assembler "_ZTch0_v0_n16_N1D1fEv" { target { ilp32  && { ! { ia64-*-hpux* } } } } } }
+// { dg-final { scan-assembler "_ZTch0_v0_n32_N1D1fEv" { target { lp64  || { ia64-*-hpux* } } } } }