This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Committed: fix testsuite/g++.dg/abi/thunk4.C and thunk3.C


A number of flaws with these test-case, two exposed for
mmix-knuth-mmixware.  First, there was a missing require-weak
(apparently there's no effective-target thingy so the
require-weak is the only way).  Then, there was missing support
for targets with leading underscore on labels.  Then, there's an
assumption that the delimeter after .weak is a TAB.

There was also another problem I'm not sure whether it's a tool
version problem or a bug in the "64-bit safeness" fix for the
test-case: with the Tcl/Expect/DejaGNU mix I used
(dejagnu-1.4.4, tcl-8.4.5-7, expect-5.39.0-96.1), the dot
matched neither 4 nor 8.  I fixed that to a working regexp.
(I mistook this problem as not handling NO_DOT_IN_LABEL support
in a first attempt to fix that I committed.)

But that's all, I think. :-}

There may be other tests with the same flaws, I haven't checked; I just
catch the ones that fails (thunk4) and sometimes nearby tests (thunk3).

Maybe a wiki page on how to write a test-case that works on
*multiple* platforms would help?

Committed as maintainer-target-fail-fixing.

gcc/testsuite:
	* g++.dg/abi/thunk3.C, g++.dg/abi/thunk4.C: Gate on
	dg-require-weak.  Adjust regexp to handle leading-underscore
	targets and space as well as TAB after .weak.  Change previous
	64-bit fix to not use naked dot.

Index: thunk3.C
===================================================================
--- thunk3.C	(revision 109236)
+++ thunk3.C	(working copy)
@@ -1,4 +1,5 @@
-// { dg-final { scan-assembler-not ".weak\t_ZThn._N7Derived3FooEv" } }
+// { dg-require-weak "" }
+// { dg-final { scan-assembler-not ".weak\[\t \]_?_ZThn\[48\]_N7Derived3FooEv" } }

 struct Base
 {
Index: thunk4.C
===================================================================
--- thunk4.C	(revision 109236)
+++ thunk4.C	(working copy)
@@ -1,4 +1,5 @@
-// { dg-final { scan-assembler ".weak\t_ZThn._N7Derived3FooEv" } }
+// { dg-require-weak "" }
+// { dg-final { scan-assembler ".weak\[ \t\]_?_ZThn\[48\]_N7Derived3FooEv" } }

 struct Base
 {

brgds, H-P


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]