From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C29A23858000; Fri, 2 Sep 2022 13:00:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C29A23858000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1662123645; bh=X/eS7IRZsCCOs6WFdI/GT9OId93H/Cyzix/qPqRJOZ0=; h=From:To:Subject:Date:From; b=X/whsgaDz2E0YlZmkgN36ELEdMLOM6lEDJaRcDo6vSUSo2qIUhU86omb5aAYd7vc9 6EnIWyNZ2Idzla2N/5Li6vUjN/CmI9M1aJJ+HZzYnJDTeIH/LzTOtV6VQW+maDO35e hiR2TFxqQO7nMpMZ7sbc79HR3t+bwLaDSB8CURmg= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug tdep/29543] New: [gdb/tdep] inferior call with complex long double vararg not handled correctly Date: Fri, 02 Sep 2022 13:00:45 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: vries at gcc dot gnu.org 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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 Bug ID: 29543 Summary: [gdb/tdep] inferior call with complex long double vararg not handled correctly Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: tdep Assignee: unassigned at sourceware dot org Reporter: vries at gcc dot gnu.org Target Milestone: --- [ Spinoff from PR29247 comment 23. ] On a powerpc system with gcc 12 built to default to 128-bit IEEE long doubl= e, I run into: ... (gdb) print find_max_long_double_real(4, ldc1, ldc2, ldc3, ldc4)^M $8 =3D 0 + 0i^M (gdb) FAIL: gdb.base/varargs.exp: print find_max_long_double_real(4, ldc1, ldc2, ldc3, ldc4) ... I've minimized this to: ... $ cat gdb/testsuite/gdb.base/varargs.c #include #include long double _Complex orig =3D 4.0L + 4.0Li; long double _Complex copy =3D 0L + 0Li; int test (void) { return 0; } void do_copy (int num_vals, ...) { #if 1 va_list argp; va_start (argp, num_vals); copy =3D va_arg (argp, long double _Complex); #else copy =3D orig; #endif } void _start (void) { test (); while (1) ; } ... and: ... $ cat gdb/testsuite/gdb.base/varargs.exp standard_testfile .c set additional_flags {debug} lappend additional_flags "additional_flags=3D-nostdlib" if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \ executable ${additional_flags}] !=3D "" } { untested "failed to compile" return -1 } clean_restart ${binfile} gdb_test_no_output "set print sevenbit-strings" gdb_test_no_output "set print address off" gdb_test_no_output "set width 0" runto test gdb_test "print orig" ".*=3D 4 \\+ 4i" gdb_test "print copy" ".*=3D 0 \\+ 0i" gdb_test "print do_copy (1, orig)" with_test_prefix "after copy" { gdb_test "print orig" ".*=3D 4 \\+ 4i" gdb_test "print copy" ".*=3D 4 \\+ 4i" } ... --=20 You are receiving this mail because: You are on the CC list for the bug.=