From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 479F43858D35; Mon, 6 May 2024 22:45:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 479F43858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1715035559; bh=GuPVVgeziZa3nBBDna7imlRNMz6dMSi4WseY5ddk1P0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Vy6joTCtxAPIEMUe2xzzdhf8c0nv+29TdIbCJ6V555OLeNZkv+1iGiGZerLnv9tkI uiMUsxHak/I+ZtUq7wvbIC1IMkSKRi52LOExVvU7J24lkxjzal3Q6M6LAxrTKtDjCa f9mvL/kAkzeUmyCTViWoXrSZ88B9spqST4cUoCr0= From: "dima.pasechnik at cs dot ox.ac.uk" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/114872] [13/14/15 Regression] Miscompilation with -O2 after commit r13-8037 Date: Mon, 06 May 2024 22:45:58 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 13.2.1 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: dima.pasechnik at cs dot ox.ac.uk X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.3 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://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114872 --- Comment #19 from Dmitrii Pasechnik = --- Declaring the last argument in the call to GAP_CallFunc3Args() volatile app= ears to fix the issue. Namely, apply diff --git a/src/sage/libs/gap/element.pyx b/src/sage/libs/gap/element.pyx index f1482997b8..7ca4a666ab 100644 --- a/src/sage/libs/gap/element.pyx +++ b/src/sage/libs/gap/element.pyx @@ -2504,6 +2504,7 @@ cdef class GapElement_Function(GapElement): cdef Obj result =3D NULL cdef Obj arg_list cdef int n =3D len(args) + cdef volatile Obj v2 if n > 0 and n <=3D 3: libgap =3D self.parent() @@ -2522,10 +2523,11 @@ cdef class GapElement_Function(GapElement): (a[0]).value, (a[1]).value) elif n =3D=3D 3: + v2 =3D (a[2]).value result =3D GAP_CallFunc3Args(self.value, (a[0]).value, (a[1]).value, - (a[2]).value) + v2) else: arg_list =3D make_gap_list(args) result =3D GAP_CallFuncList(self.value, arg_list)=