commit 24a8810a97155710d3c53b401eb8729bc4f80c00 Author: David Blaikie Date: Sun Apr 13 00:48:45 2014 -0700 Return by value to coax Clang into emitting the full definition of a test type. gdb/testsuite/ * gdb.cp/pr10728-x.cc: Return by value instead of pointer to coax Clang into emitting the definition of the type. * gdb.cp/pr10728-x.h: Ditto. * gdb.cp/pr10728-y.cc: Ditto. diff --git gdb/testsuite/ChangeLog gdb/testsuite/ChangeLog index 730c116..1d15721 100644 --- gdb/testsuite/ChangeLog +++ gdb/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2014-04-12 David Blaikie + + * gdb.cp/pr10728-x.cc: Return by value instead of pointer to coax + Clang into emitting the definition of the type. + * gdb.cp/pr10728-x.h: Ditto. + * gdb.cp/pr10728-y.cc: Ditto. + 2014-04-12 Siva Chandra Reddy Doug Evans diff --git gdb/testsuite/gdb.cp/pr10728-x.cc gdb/testsuite/gdb.cp/pr10728-x.cc index 7623c0b..d6b7666 100644 --- gdb/testsuite/gdb.cp/pr10728-x.cc +++ gdb/testsuite/gdb.cp/pr10728-x.cc @@ -2,6 +2,6 @@ int main() { - X* x = y(); + X x = y(); return 0; // marker 1 } diff --git gdb/testsuite/gdb.cp/pr10728-x.h gdb/testsuite/gdb.cp/pr10728-x.h index 63737d9..0ba58bb 100644 --- gdb/testsuite/gdb.cp/pr10728-x.h +++ gdb/testsuite/gdb.cp/pr10728-x.h @@ -5,5 +5,5 @@ struct X Y* y2; }; -X* y(); +X y(); diff --git gdb/testsuite/gdb.cp/pr10728-y.cc gdb/testsuite/gdb.cp/pr10728-y.cc index 84b222d..d8a932a 100644 --- gdb/testsuite/gdb.cp/pr10728-y.cc +++ gdb/testsuite/gdb.cp/pr10728-y.cc @@ -1,11 +1,11 @@ #include "pr10728-x.h" struct Y{}; -X* y() +X y() { - static X xx; + X xx; static Y yy; xx.y1 = &yy; xx.y2 = xx.y1+1; - return &xx; + return xx; }