From 2b6969cd7f409441be66aafda0d2cc7f27ed310c Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Thu, 29 Jan 2015 10:12:14 +0000 Subject: [PATCH] Run guality tests on Solaris * gcc.dg/guality/guality.h (main): Add argv[0] to guality_gdb_command. From-SVN: r220237 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/guality/guality.exp | 2 +- gcc/testsuite/gcc.dg/guality/guality.exp | 2 +- gcc/testsuite/gcc.dg/guality/guality.h | 10 ++++++++++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a0fbef7c30b..729f386011a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-01-29 Rainer Orth + + * gcc.dg/guality/guality.h (main): Add argv[0] to + guality_gdb_command. + 2015-01-29 Jan Hubicka PR ipa/64801 diff --git a/gcc/testsuite/g++.dg/guality/guality.exp b/gcc/testsuite/g++.dg/guality/guality.exp index 283c079f37e..5bffd9df1a0 100644 --- a/gcc/testsuite/g++.dg/guality/guality.exp +++ b/gcc/testsuite/g++.dg/guality/guality.exp @@ -5,7 +5,7 @@ load_lib gcc-gdb-test.exp # Disable on darwin until radr://7264615 is resolved. if { [istarget *-*-darwin*] } { - return + return } if { [istarget "powerpc-ibm-aix*"] } { diff --git a/gcc/testsuite/gcc.dg/guality/guality.exp b/gcc/testsuite/gcc.dg/guality/guality.exp index e21d5f5e1a4..d2b863397ba 100644 --- a/gcc/testsuite/gcc.dg/guality/guality.exp +++ b/gcc/testsuite/gcc.dg/guality/guality.exp @@ -5,7 +5,7 @@ load_lib gcc-gdb-test.exp # Disable on darwin until radr://7264615 is resolved. if { [istarget *-*-darwin*] } { - return + return } if { [istarget "powerpc-ibm-aix*"] } { diff --git a/gcc/testsuite/gcc.dg/guality/guality.h b/gcc/testsuite/gcc.dg/guality/guality.h index 8b657f29f0b..52fa706ffe3 100644 --- a/gcc/testsuite/gcc.dg/guality/guality.h +++ b/gcc/testsuite/gcc.dg/guality/guality.h @@ -228,6 +228,16 @@ main (int argc, char *argv[]) } } + if (argv[0]) + { + int len = strlen (guality_gdb_command) + 1 + strlen (argv[0]); + char *buf = (char *) __builtin_alloca (len); + strcpy (buf, guality_gdb_command); + strcat (buf, " "); + strcat (buf, argv[0]); + guality_gdb_command = buf; + } + for (i = 1; i < argc; i++) if (strcmp (argv[i], "--guality-skip") == 0) guality_skip = 1; -- 2.30.2