Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Unified Diff: gdb/testsuite/gdb.mi/mi-var-cp.cc

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/testsuite/gdb.mi/mi-var-cmd.exp ('k') | gdb/testsuite/gdb.mi/mi-var-cp.exp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.mi/mi-var-cp.cc
diff --git a/gdb/testsuite/gdb.mi/mi-var-cp.cc b/gdb/testsuite/gdb.mi/mi-var-cp.cc
index f23913b13bb1e50d9a4df7ca151a3baf01933ec6..abdee9f67741756fee36f2b02077912e3d67253b 100644
--- a/gdb/testsuite/gdb.mi/mi-var-cp.cc
+++ b/gdb/testsuite/gdb.mi/mi-var-cp.cc
@@ -205,6 +205,51 @@ int path_expression ()
/*: END: path_expression :*/
}
+class Anonymous
+{
+public:
+ struct { /* index: 0 */
+ int b;
+ };
+ struct { /* index: 1 */
+ int c;
+ };
+ struct { /* index: 2 */
+ int d;
+ struct { /* index: 1 */
+ int e;
+ struct { /* index: 0 */
+ int f;
+ union { /* index: 0 */
+ int g;
+ char h;
+ };
+ };
+ union { /* index: 0 */
+ int i;
+ char j;
+ };
+ };
+ };
+};
+
+/* Test anonymous structs and unions. */
+int
+anonymous_structs_and_unions (void)
+{
+ Anonymous a;
+ a.b = 1;
+ a.c = 2;
+ a.d = 3;
+ a.e = 4;
+ a.f = 5;
+ a.g = 6;
+ a.h = '7';
+ a.i = 8;
+ a.j = '8';
+ return 0; /* anonymous_structs_and_unions */
+}
+
int main ()
{
reference_update_tests ();
@@ -212,5 +257,6 @@ int main ()
reference_to_pointer ();
reference_to_struct ();
path_expression ();
+ anonymous_structs_and_unions ();
return 0;
}
« no previous file with comments | « gdb/testsuite/gdb.mi/mi-var-cmd.exp ('k') | gdb/testsuite/gdb.mi/mi-var-cp.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698