/* 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.
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 *
struct dummy *tt;
const enum dummy_enum *e;
tt = t;
- return t;
+ return hack (t, e);
}
enum dummy_enum {
enum1,
enum2
-};
+} tag_dummy_enum;
+
+void *
+hack (const struct dummy *t, const enum dummy_enum *e)
+{
+ return (void *) t;
+}
int
main ()