From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C2E43385840F; Mon, 31 Jul 2023 00:06:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C2E43385840F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1690761962; bh=MrwT9tCJBgnNwn7rgq2mIwKZgnGcWhQ721MsTupbujk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=QDvBLaFgxasTLs5+zkm3AhvL2rqwjNyrqyF/TvxDnq0wEJ6UH/ccz8G1ZZy1Hj4zr RSExzoRNWL8CYBtdc9jWghe89QUpo9RsyW8PSyAwYVAmTLiMpobIoEMTGlxWPjHfyV aWVh7LD9uZItzp8EZq0mc4N0zXKC1AHdviHw/5xw= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug modula2/110174] Using illegal constraints for builtin return_address gives ICE Date: Mon, 31 Jul 2023 00:06:01 +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.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED 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=3D110174 --- Comment #4 from CVS Commits --- The releases/gcc-13 branch has been updated by Gaius Mulley : https://gcc.gnu.org/g:c8024088ccc263833d005afe7df835109db1965b commit r13-7659-gc8024088ccc263833d005afe7df835109db1965b Author: Gaius Mulley Date: Mon Jul 31 01:05:20 2023 +0100 PR modula2/110174 Bugfixes to M2GenGCC.mod:CodeInline preventing an ICE This patch calls skip_const_decl before chaining parameter values and ensures that all strings passed to build_stmt (..., ASM_EXPR, ...) are nul terminated. It also improves the accuracy of locations in function calls and asm statements. gcc/m2/ PR modula2/110174 * gm2-compiler/M2GCCDeclare.def (PromoteToCString): New procedu= re function. * gm2-compiler/M2GCCDeclare.mod (PromoteToCString): New procedu= re function. * gm2-compiler/M2GenGCC.mod (BuildTreeFromInterface): Call skip_const_decl before chaining the parameter value. Use PromoteToCString to ensure the string is nul terminated. (CodeInline): Remove all parameters and replace with quad. Use GetQuadOtok to get operand token numbers. Remove call to DeclareConstant and replace it with PromoteToCString. * gm2-compiler/M2Quads.def (BuildInline): Rename into ... (BuildAsm): ... this. * gm2-compiler/M2Quads.mod: (BuildInline): Rename into ... (BuildAsm): ... this. (BuildAsmElement): Add debugging. * gm2-compiler/P1Build.bnf: Remove import of BuildInline. * gm2-compiler/P2Build.bnf: Remove import of BuildInline. * gm2-compiler/P3Build.bnf: Remove import of BuildInline and import BuildAsm. * gm2-compiler/PHBuild.bnf: Remove import of BuildInline. * gm2-libs-iso/SysClock.mod (foo): Remove. * gm2-libs/FIO.mod (BufferedRead): Rename parameter a to dest. Rename variable t to src. * m2pp.cc (pf): Correct block comment. (pe): Correct block comment. (m2pp_asm_expr): New function. (m2pp_statement): Call m2pp_asm_expr. gcc/testsuite/ PR modula2/110174 * gm2/pim/pass/program2.mod: Remove import of BuildInline. * gm2/extensions/asm/fail/extensions-asm-fail.exp: New test. * gm2/extensions/asm/fail/stressreturn.mod: New test. * gm2/extensions/asm/pass/extensions-asm-pass.exp: New test. * gm2/extensions/asm/pass/fooasm.mod: New test. (cherry picked from commit c4637cbed3f23095b98962b41063380c4ab9eda9) Signed-off-by: Gaius Mulley =