aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorBruno Larsen <blarsen@redhat.com>2022-07-20 16:44:35 -0300
committerBruno Larsen <blarsen@redhat.com>2022-09-22 11:04:18 +0200
commit8d215439f665e51adc55dc2c4ba743ee576cb2fc (patch)
tree2dedde040e3303e34974ecfff227ab3b942e3223 /gdb
parent4037b4191a0ed4f8fc51564416519886bc88a1b7 (diff)
downloadgdb-8d215439f665e51adc55dc2c4ba743ee576cb2fc.zip
gdb-8d215439f665e51adc55dc2c4ba743ee576cb2fc.tar.gz
gdb-8d215439f665e51adc55dc2c4ba743ee576cb2fc.tar.bz2
gdb/testsuite: fix gdb.base/msym-bp-shl when running with Clang
When trying to test gdb.base/msym-bp-shl.exp using clang, it would have many failures because one of the version of the foo function was being optimized away. Adding __attribute__ ((used)) to it fixed this.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/gdb.base/msym-bp-shl-main-2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.base/msym-bp-shl-main-2.c b/gdb/testsuite/gdb.base/msym-bp-shl-main-2.c
index e047ac1..009656f 100644
--- a/gdb/testsuite/gdb.base/msym-bp-shl-main-2.c
+++ b/gdb/testsuite/gdb.base/msym-bp-shl-main-2.c
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-static void
+static void __attribute__ ((used))
foo (void)
{
}