From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 78C1C39F080C; Fri, 5 Feb 2021 09:56:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 78C1C39F080C From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug exp/27265] gdbtypes.c:3429: internal-error: type* init_complex_type(const char*, type*): Assertion `target_type->code () == TYPE_CODE_INT || target_type->code () == TYPE_CODE_FLT' failed. Date: Fri, 05 Feb 2021 09:56:44 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: exp X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit 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: 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 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2021 09:56:44 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27265 --- Comment #9 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Tom de Vries : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dae7104966177= c7bcb7bef9e1445489d9d2f97f06 commit ae7104966177c7bcb7bef9e1445489d9d2f97f06 Author: Tom de Vries Date: Fri Feb 5 10:56:39 2021 +0100 [gdb/exp] Fix assert when adding ptr to imaginary unit I'm running into this assertion failure: ... $ gdb -batch -ex "p (void *)0 - 5i" gdbtypes.c:3430: internal-error: \ type* init_complex_type(const char*, type*): Assertion \ `target_type->code () =3D=3D TYPE_CODE_INT \ || target_type->code () =3D=3D TYPE_CODE_FLT' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. ... This is a regression since commit c34e8714662 "Implement complex arithmetic". Before that commit we had: ... (gdb) p (void *)0 - 5i Argument to arithmetic operation not a number or boolean. ... Fix this in complex_binop by throwing an error, such that we have: ... (gdb) print (void *)0 - 5i Argument to complex arithmetic operation not supported. ... Tested on x86_64-linux. gdb/ChangeLog: 2021-02-05 Tom de Vries PR exp/27265 * valarith.c (complex_binop): Throw an error if complex type ca= n't be created. gdb/testsuite/ChangeLog: 2021-02-05 Tom de Vries PR exp/27265 * gdb.base/complex-parts.exp: Add tests. --=20 You are receiving this mail because: You are on the CC list for the bug.=