From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8DFB33858D35; Sun, 5 Mar 2023 22:32:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8DFB33858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678055541; bh=7MnZBvLSvGoNR8gwYuELfMknUkBuuQch+7q+IDDLL+0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fqKWzPa7TuGUv9oezmJuMuZ8tGgmV+ntOokY0cP1miuhF40q8JLdzdyARGQHEuLsq rn54rcIQgg7S+NBC2mL2wEUjglhrOxY5iT9nb24aQDtCx5m4VEgNrLFosBFsUuVm0p XD3U4/xtB9v4Awq7knu+pa0FHlxzxFNMtuyGajqs= From: "roland.illig at gmx dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug modula2/109032] message 'compiler checks to force' is too complicated Date: Sun, 05 Mar 2023 22:32:21 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: modula2 X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: roland.illig at gmx dot de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: gaius at gcc dot gnu.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://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109032 --- Comment #4 from Roland Illig --- While here: > (* > BuildDivM2 - build and return ((op2 < 0) : (op1 divtrunc op2) ? (op1 d= ivfloor op2)) > when -fiso, -fpim4 or -fpositive-mod-floor-div is present= else > return op1 div trunc op2 > *) Did you swap the operators '?' and ':' here? I had to look this up because this message was completely unclear to me: > force positive result from MOD and DIV result floor The explanation from gm2.texi is much clearer: > All modulus results are positive and the results from the division are rounded to the floor.=