The function f1 in gdb.base/vla-optimized-out.c sets various
attributes to prevent its being inlined, but Clang inlines it
anyway, causing the test that uses it to fail. This commit
adds the "weak" attribute to cause Clang to keep the function
fully out of line so the test can operate as it should.
gdb/testsuite/ChangeLog:
* gdb.base/vla-optimized-out.c (f1): Add __attribute__ ((weak)).
+2020-11-10 Gary Benson <gbenson@redhat.com>
+
+ * gdb.base/vla-optimized-out.c (f1): Add __attribute__ ((weak)).
+
2020-11-10 Gary Benson <gbenson@redhat.com>
* gdb.cp/step-and-next-inline.exp: Only require
int
#ifdef NOCLONE
-__attribute__((noinline)) ATTRIBUTE_NOCLONE
+__attribute__((noinline,weak)) ATTRIBUTE_NOCLONE
#else
-__attribute__((noinline))
+__attribute__((noinline,weak))
#endif
f1 (int i)
{