public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug modula2/108121] Failing tests on x86_64-linux-gnu Date: Fri, 28 Jul 2023 02:10:50 +0000 [thread overview] Message-ID: <bug-108121-4-gQPalOLM4Q@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-108121-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108121 --- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-13 branch has been updated by Gaius Mulley <gaius@gcc.gnu.org>: https://gcc.gnu.org/g:50fc6ce0cb8edf927ae6117a5484e4d8d52e393e commit r13-7619-g50fc6ce0cb8edf927ae6117a5484e4d8d52e393e Author: Gaius Mulley <gaiusmod2@gmail.com> Date: Fri Jul 28 03:10:01 2023 +0100 PR modula2/108121 Re-implement overflow detection for constant literals This patch fixes the overflow detection for constant literals. The ZTYPE is changed to int128 (or int64) if int128 is unavailable and constant literals are built from widest_int. The widest_int is converted into the tree type and checked for overflow. m2expr_interpret_integer and append_m2_digit are removed. gcc/m2/ChangeLog: PR modula2/108121 * gm2-compiler/M2ALU.mod (Less): Reformatted. * gm2-compiler/SymbolTable.mod (DetermineSizeOfConstant): Remove from import. (ConstantStringExceedsZType): Import. (GetConstLitType): Re-implement using ConstantStringExceedsZType. * gm2-gcc/m2decl.cc (m2decl_DetermineSizeOfConstant): Remove. (m2decl_ConstantStringExceedsZType): New function. (m2decl_BuildConstLiteralNumber): Re-implement. * gm2-gcc/m2decl.def (DetermineSizeOfConstant): Remove. (ConstantStringExceedsZType): New function. * gm2-gcc/m2decl.h (m2decl_DetermineSizeOfConstant): Remove. (m2decl_ConstantStringExceedsZType): New function. * gm2-gcc/m2expr.cc (append_digit): Remove. (m2expr_interpret_integer): Remove. (append_m2_digit): Remove. (m2expr_StrToWideInt): New function. (m2expr_interpret_m2_integer): Remove. * gm2-gcc/m2expr.def (CheckConstStrZtypeRange): New function. * gm2-gcc/m2expr.h (m2expr_StrToWideInt): New function. * gm2-gcc/m2type.cc (build_m2_word64_type_node): New function. (build_m2_ztype_node): New function. (m2type_InitBaseTypes): Call build_m2_ztype_node. * gm2-lang.cc (gm2_type_for_size): Re-write using early returns. gcc/testsuite/ChangeLog: PR modula2/108121 * gm2/pim/fail/largeconst.mod: Increased constant value test to fail now that cc1gm2 uses widest_int to represent a ZTYPE. * gm2/pim/fail/largeconst2.mod: New test. (cherry picked from commit 68201409bc2867da45791331e385198826fa4576) Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
next prev parent reply other threads:[~2023-07-28 2:10 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-12-15 9:13 [Bug modula2/108121] New: " marxin at gcc dot gnu.org 2022-12-15 9:14 ` [Bug modula2/108121] " marxin at gcc dot gnu.org 2022-12-15 9:14 ` marxin at gcc dot gnu.org 2022-12-15 9:23 ` marxin at gcc dot gnu.org 2022-12-20 14:26 ` jakub at gcc dot gnu.org 2023-01-15 13:22 ` gaius at gcc dot gnu.org 2023-01-15 13:28 ` gaius at gcc dot gnu.org 2023-04-26 0:28 ` gaius at gcc dot gnu.org 2023-04-26 1:24 ` gaius at gcc dot gnu.org 2023-04-26 1:57 ` cvs-commit at gcc dot gnu.org 2023-04-26 6:57 ` rguenth at gcc dot gnu.org 2023-07-27 9:24 ` rguenth at gcc dot gnu.org 2023-07-28 2:10 ` cvs-commit at gcc dot gnu.org [this message] 2023-07-28 2:28 ` gaius at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-108121-4-gQPalOLM4Q@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).