From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 539B63858D32; Sun, 15 Jan 2023 20:48:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 539B63858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673815694; bh=ZmCZidUo1KSo+yGem0xfyUhZKg59aSW9p/YAA/3efcI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=LGUxDDHX38X6ZcMC/DmpwVANug/LK5Xu5ZBGidk7VuTnb5EiiF7klBWlPZn6RVZuO rW53Q+3yR1gK2o20qL51bD5M0rPhEY2lNMIlohAhl4UrXARe+Xnk7D2QaYMPVgvzf0 3Dk9eLYo76fF4b+XT5ZxK1LGjcAdJ9pJ95+zN33U= From: "gaius at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug modula2/108404] M2RTS_Halt fails with a segv (it should emit a diagnostic and exit). Date: Sun, 15 Jan 2023 20:48:13 +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: gaius at gcc dot gnu.org 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=3D108404 --- Comment #1 from Gaius Mulley --- Ah the ARRAY OF CHAR is passed as: struct { char *contents; unsigned int h= igh }. (Even if VAR or non VAR). The effect of non VAR is for the callee to take a copy. Essentially if RTco calls halt it should: struct { char *contents, unsigned int high } file_aoc, desc_aoc, func_aoc ; file_aoc.contents =3D __FILE__; file_aoc.high =3D strlen (file_aoc.contents) -1; /* the last legal indice = of the array. */ /* same for desc_aoc, func_aoc. */ Halt (file_aoc, __LINE__, desc_aoc, func_aoc)=