===================================================================
@@ -313,6 +313,9 @@
def __init__ (self, typename, val):
self.typename = typename
self.val = val;
+ type = self.val.type
+ if type.code == gdb.TYPE_CODE_REF:
+ self.val = self.val.referenced_value()
def children (self):
return self._iterator (self.val)
===================================================================
@@ -1,5 +1,5 @@
// { dg-do run }
-// { dg-options "-std=gnu++11 -g" }
+// { dg-options "-std=gnu++11 -g -O0" }
// Copyright (C) 2011-2013 Free Software Foundation, Inc.
//
@@ -25,6 +25,8 @@
#include <memory>
#include <iostream>
+typedef std::tuple<int, int> ExTuple;
+
template<class T>
void
placeholder(const T &s)
@@ -100,6 +102,10 @@
uptr->i = 23;
// { dg-final { regexp-test uptr {std::unique_ptr.datum. containing 0x.*} } }
+ ExTuple tpl(6,7);
+// { dg-final { note-test tpl {std::tuple containing = {[1] = 6, [2] = 7}} } }
+ ExTuple &rtpl = tpl;
+// { dg-final { note-test rtpl {std::tuple containing = {[1] = 6, [2] = 7}} } }
placeholder(""); // Mark SPOT
use(efl);
use(fl);