This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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]

[commit/testsuite] Work around GCC PR 43053


I have a patch (working around yet more compiler bugs) which causes us
to read the type of a function from its DW_AT_specification.
Normally, you'd expect the function and the function's specification
to have the same type - it's not a very good specification if they
have different types!  Unfortunately, I encountered (and filed):

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43053

The type of "this" is "foo * const" in the function but "foo *" in the
specification.

As this is irrelevant to the point of the new overload.exp tests, I've
changed the tests to accept both forms.  I'll keep an eye on the GCC
bug to see which form is considered canonical.

-- 
Daniel Jacobowitz
CodeSourcery

2010-02-16  Daniel Jacobowitz  <dan@codesourcery.com>

	gdb/testsuite/
	* gdb.cp/overload.exp: Allow foo::overload1arg's "this" pointer to
	be const or non-const.

diff -urp gdb-merged-orig/gdb/testsuite/gdb.cp/overload.exp gdb-merged/gdb/testsuite/gdb.cp/overload.exp
--- gdb-merged-orig/gdb/testsuite/gdb.cp/overload.exp	2010-02-10 14:52:36.000000000 -0800
+++ gdb-merged/gdb/testsuite/gdb.cp/overload.exp	2010-02-15 16:51:40.000000000 -0800
@@ -333,13 +333,13 @@ gdb_test "print foo::overload1arg(char**
     "print foo::overload1arg(char***)"
 
 gdb_test "print foo::overload1arg(void)" \
-    "\\$$decimal = {int \\(foo \\* const\\)} $hex <foo::overload1arg\\(\\)>" \
+    "\\$$decimal = {int \\(foo \\*( const|)\\)} $hex <foo::overload1arg\\(\\)>" \
     "print foo::overload1arg(void)"
 
 foreach t [list char "signed char" "unsigned char" "short" \
 	       "unsigned short" int "unsigned int" long "unsigned long" \
 	       float double] {
     gdb_test "print foo::overload1arg($t)" \
-	"\\$$decimal = {int \\(foo \\* const, $t\\)} $hex <foo::overload1arg\\($t\\)>" \
+	"\\$$decimal = {int \\(foo \\*( const|), $t\\)} $hex <foo::overload1arg\\($t\\)>" \
 	"print foo::overload1arg($t)"
 }


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