Patchwork RFA: fix libstdc++ pretty-printer test

login
register
mail settings
Submitter Tom Tromey
Date June 5, 2013, 4:59 p.m.
Message ID <87a9n4jxxv.fsf@fleche.redhat.com>
Download mbox | patch
Permalink /patch/249142/
State New
Headers show

Comments

Tom Tromey - June 5, 2013, 4:59 p.m.
The pretty-printer test "shared_ptr.cc" fails for me on x86-64 Fedora 18.
The local variable "esp" is optimized out.

Since the purpose of this test is to test the pretty-printers, it seemed
simplest to me to just disable optimizations.  The appended fixes the
problem for me.

Ok?

Tom

2013-06-05  Tom Tromey  <tromey@redhat.com>

	* testsuite/libstdc++-prettyprinters/shared_ptr.cc: Use -O0.
Jonathan Wakely - June 5, 2013, 5:47 p.m.
On 5 June 2013 17:59, Tom Tromey wrote:
> The pretty-printer test "shared_ptr.cc" fails for me on x86-64 Fedora 18.
> The local variable "esp" is optimized out.
>
> Since the purpose of this test is to test the pretty-printers, it seemed
> simplest to me to just disable optimizations.  The appended fixes the
> problem for me.
>
> Ok?

OK, thanks.

Patch

diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/shared_ptr.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/shared_ptr.cc
index 547213f..0e4e6c2 100644
--- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/shared_ptr.cc
+++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/shared_ptr.cc
@@ -1,5 +1,5 @@ 
 // { dg-do run }
-// { dg-options "-std=gnu++11 -g" }
+// { dg-options "-std=gnu++11 -g -O0" }
 
 // Copyright (C) 2012-2013 Free Software Foundation, Inc.
 //