Update copyright year range in all GDB files.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.stabs / gdb11479.c
index 257be5e360a6c2e825739f5f2ba89f5389a4b6bc..c80d35d3b2ef7f2a6b8739198e766edcf59ba905 100644 (file)
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010 Free Software Foundation, Inc.
+   Copyright 2010-2020 Free Software Foundation, Inc.
 
    Contributed by Pierre Muller.
 
@@ -23,13 +23,17 @@ struct dummy;
 
 enum dummy_enum;
 
+/* This function prevents the compiler from dropping local variables
+   we need for the test.  */
+void *hack (const struct dummy *t, const enum dummy_enum *e);
+
 const void *
 test (const struct dummy *t)
 {
   const struct dummy *tt;
   enum dummy_enum *e;
   tt = t;
-  return t;
+  return hack (t, e);
 }
 
 void *
@@ -38,7 +42,7 @@ test2 (struct dummy *t)
   struct dummy *tt;
   const enum dummy_enum *e;
   tt = t;
-  return t;
+  return hack (t, e);
 }
 
 
@@ -51,7 +55,13 @@ struct dummy {
 enum dummy_enum {
   enum1,
   enum2
-};
+} tag_dummy_enum;
+
+void *
+hack (const struct dummy *t, const enum dummy_enum *e)
+{
+  return (void *) t;
+}
 
 int
 main ()
This page took 0.024957 seconds and 4 git commands to generate.