From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2FA4F3858D28; Wed, 7 Sep 2022 18:22:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2FA4F3858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1662574970; bh=70tqos96jXPInTV4X2/bkPKuz1zxF4YUaVUbPMUP3dc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=U2h6glygvGFBAU7pwONYCdyh3+ZKBjZeBGGUQv2hAxwYuJm0vtMMCClGBd50Rf9qN G/h4bwyTLMMPyNTtD8rrkJvzH7CYl51WSS41d1DmnyeEYUecuu/6MGpWLcY2Zs5aFc E1C4JiVG1RHyiZpcr71bu9gir7jmGwSYVjPZvB/w= From: "cel at us dot ibm.com" To: gdb-prs@sourceware.org Subject: [Bug tdep/29543] [gdb/tdep, ppc] inferior call with long double vararg not handled correctly Date: Wed, 07 Sep 2022 18:22:49 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: tdep X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cel at us dot ibm.com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29543 --- Comment #13 from Carl E Love --- I ran the following on a Power 10 system with: Fedora release 36 (Thirty Six) gcc (GCC) 12.2.1 20220819 (Red Hat 12.2.1-1) Initially with the current gdb tree, the top commit was: commit d647c797b7386dcaca5984a3fbe9fba469771737 (origin/master, origin/HEAD) Author: Aaron Merey Date: Fri Sep 2 19:01:56 2022 -0400 Add debuginfod support for objdump -S ... The make check RUNTESTFLAGS=3D'GDB=3D/home/carll/bin/gdb gdb.base/varargs= .exp ' test was used. The results from the test in gdb/testsuite/gdb.log were: gdb) FAIL: gdb.base/varargs.exp: print find_max_long_double_real(4, ldc1, l= dc2, ldc3, ldc4) testcase /home/carll/GDB/binutils-gdb-bug-29247/gdb/testsuite/gdb.base/varargs.exp completed in 0 seconds =3D=3D=3D gdb Summary =3D=3D=3D # of expected passes 10 # of unexpected failures 1 gdb reported one failure as expected. ----------------- >From Tom's patch, I added just the gdb code change: --- a/gdb/ppc-sysv-tdep.c +++ b/gdb/ppc-sysv-tdep.c @@ -1444,7 +1444,7 @@ ppc64_sysv_abi_push_param (struct gdbarch *gdbarch, =3D=3D floatformats_ieee_quad)) { /* IEEE FLOAT128, args in vector registers. */ - ppc64_sysv_abi_push_val (gdbarch, val, TYPE_LENGTH (type), 0, argpos= ); + ppc64_sysv_abi_push_val (gdbarch, val, TYPE_LENGTH (type), 16, argpo= s); ppc64_sysv_abi_push_vreg (gdbarch, val, argpos); } The gdb test now passes with: =3D=3D=3D gdb Summary =3D=3D=3D # of expected passes 11 as expected. --------------------- Add just the testcase changes for the long double _Complex case, i.e. no additional gdb functional changes. The results of the run were: (gdb) FAIL: gdb.base/varargs.exp: print find_max_struct_long_double_real(4, sldc1, sldc2, sldc3, sldc4) testcase /home/carll/GDB/binutils-gdb-bug-29247/gdb/testsuite/gdb.base/varargs.exp completed in 1 seconds =3D=3D=3D gdb Summary =3D=3D=3D # of expected passes 11 # of unexpected failures 1 Which generates the error as Ulrich expected. ---------------------- Added the additional fixes from Tom's patch to address the complex case. T= he=20 results of the gdb test was: =3D=3D=3D gdb Summary =3D=3D=3D # of expected passes 12 With Tom's additional fixes, the updated testcase also passes. Tom's patch works with elf v2 and the gcc version 12 built to default to 128-bit IEEE long double. --=20 You are receiving this mail because: You are on the CC list for the bug.=