Two subtests of gdb.base/list.exp failed when built with Clang
because the unused function "unused" was optimized out. This
commit adds __attribute__ ((used)) to both definitions.
gdb/testsuite/ChangeLog:
* gdb.base/list0.c (unused): Add __attribute__ ((used)).
* gdb.base/list1.c (unused): Likewise.
+2020-10-06 Gary Benson <gbenson@redhat.com>
+
+ * gdb.base/list0.c (unused): Add __attribute__ ((used)).
+ * gdb.base/list1.c (unused): Likewise.
+
2020-10-06 Gary Benson <gbenson@redhat.com>
* gdb.base/list-ambiguous0.c (ambiguous_var): Add
return 0;
}
-static void
+static void __attribute__ ((used))
unused ()
{
/* Not used for anything */
long_line ();
}
-static void
+static void __attribute__ ((used))
unused ()
{
/* Not used for anything */