From: Tom de Vries Date: Mon, 26 Sep 2022 11:43:42 +0000 (+0200) Subject: [gdb/testsuite] Fix gdb.dwarf2/dw2-unspecified-type-foo.c with -m32 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=757b1c20d49438a19cb3bfd5ce5db20f40ce4e21;p=binutils-gdb.git [gdb/testsuite] Fix gdb.dwarf2/dw2-unspecified-type-foo.c with -m32 When running test-case gdb.dwarf2/dw2-unspecified-type-foo.c with target board unix/-m32, I run into: ... (gdb) PASS: gdb.dwarf2/dw2-unspecified-type.exp: ptype foo p ((int (*) ()) foo) ()^M $1 = -135698472^M ... Add the missing "return 0" in foo, which fixes this. Tested on x86_64-linux. --- diff --git a/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type-foo.c b/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type-foo.c index b1e3a8b98e4..c92e18b898f 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type-foo.c +++ b/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type-foo.c @@ -19,4 +19,5 @@ int foo (void) { asm ("foo_label: .globl foo_label"); + return 0; }