Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [OB PATCH][gdb/testsuite] Make noclone conditional in vla-optimized-out.c
Date: Fri, 20 Jul 2018 15:05:00 -0000	[thread overview]
Message-ID: <20180720150532.e7dvwtbzyysqwcld@delia> (raw)

Hi,

Make the noclone attribute on f1 in vla-optimized-out.c conditional.  This
makes the test-case by default identical to
gcc/testsuite/gcc.dg/guality/vla-1.c.

Tested on x86_64-linux.

OK for trunk?

Thanks,
- Tom

[gdb/testsuite] Make noclone conditional in vla-optimized-out.c

2018-07-20  Tom de Vries  <tdevries@suse.de>

	* gdb.base/vla-optimized-out.c: Make noclone attribute conditional on
	NOCLONE macro.
	* gdb.base/vla-optimized-out.exp: Use additional_flags -DNOCLONE.

---
 gdb/testsuite/gdb.base/vla-optimized-out.c   | 7 ++++++-
 gdb/testsuite/gdb.base/vla-optimized-out.exp | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/gdb/testsuite/gdb.base/vla-optimized-out.c b/gdb/testsuite/gdb.base/vla-optimized-out.c
index 913e8ea867..ec0a6fdd80 100644
--- a/gdb/testsuite/gdb.base/vla-optimized-out.c
+++ b/gdb/testsuite/gdb.base/vla-optimized-out.c
@@ -15,7 +15,12 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-int __attribute__((noinline, noclone))
+int
+#ifdef NOCLONE
+__attribute__((noinline, noclone))
+#else
+__attribute__((noinline))
+#endif
 f1 (int i)
 {
   char a[i + 1];
diff --git a/gdb/testsuite/gdb.base/vla-optimized-out.exp b/gdb/testsuite/gdb.base/vla-optimized-out.exp
index 39abb795c8..b27569ed1e 100644
--- a/gdb/testsuite/gdb.base/vla-optimized-out.exp
+++ b/gdb/testsuite/gdb.base/vla-optimized-out.exp
@@ -18,7 +18,7 @@
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" $testfile $srcfile \
-	  {debug optimize=-O1}] } {
+	  {debug optimize=-O1 additional_flags=-DNOCLONE}] } {
     return -1
 }
 


             reply	other threads:[~2018-07-20 15:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-20 15:05 Tom de Vries [this message]
2018-07-25 19:19 ` Tom Tromey
2018-07-26  8:33   ` Tom de Vries

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180720150532.e7dvwtbzyysqwcld@delia \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox