From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1499) id 195B73875B46; Tue, 6 Dec 2022 18:44:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 195B73875B46 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1670352257; bh=/Q73u/yahrhzNSwF6YxQrKqG1A5YQHwPc0FIndACSSo=; h=From:To:Subject:Date:From; b=IDvhJQ4z4LXuAJ2qzApKbH/IZr6QhJjjYGEo81dvntgh3OpvExolmV0kHmsp6fbIf zPEcTf5wcLFIIY7lnNj6Z8fW0xPknGpBnxYJGtqHFG0z2NlB1sIm5RWTh5whNZ+2PI GaudqIR70Iuhni2KAPjg386+1aBxvN9+uGr/skHc= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Gaius Mulley To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/modula-2] Bugfix gm2_type_for_size. Patchset suggestion missed. X-Act-Checkin: gcc X-Git-Author: Gaius Mulley X-Git-Refname: refs/heads/devel/modula-2 X-Git-Oldrev: 5405813b8aab29b9ca035a8c7bceac178494649f X-Git-Newrev: 98b201a33be33a60e10e67fb7f6c9d0fc5da00fc Message-Id: <20221206184417.195B73875B46@sourceware.org> Date: Tue, 6 Dec 2022 18:44:17 +0000 (GMT) List-Id: https://gcc.gnu.org/g:98b201a33be33a60e10e67fb7f6c9d0fc5da00fc commit 98b201a33be33a60e10e67fb7f6c9d0fc5da00fc Author: Gaius Mulley Date: Tue Dec 6 18:43:44 2022 +0000 Bugfix gm2_type_for_size. Patchset suggestion missed. A feedback suggestion missed with the previous commits. Use build_nonstandard_integer_type to avoid getting a different type each time this function is called. gcc/m2/ChangeLog: * m2/gm2-lang.cc (gm2_type_for_size): Use build_nonstandard_integer_type. Signed-off-by: Gaius Mulley Diff: --- gcc/m2/gm2-lang.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gcc/m2/gm2-lang.cc b/gcc/m2/gm2-lang.cc index 2f57d740a36..4acec02b55c 100644 --- a/gcc/m2/gm2-lang.cc +++ b/gcc/m2/gm2-lang.cc @@ -816,7 +816,8 @@ gm2_type_for_size (unsigned int bits, int unsignedp) else if (bits == LONG_LONG_TYPE_SIZE) type = long_long_unsigned_type_node; else - type = make_unsigned_type (bits); + type = build_nonstandard_integer_type (bits, + unsignedp); } else { @@ -831,7 +832,8 @@ gm2_type_for_size (unsigned int bits, int unsignedp) else if (bits == LONG_LONG_TYPE_SIZE) type = long_long_integer_type_node; else - type = make_signed_type (bits); + type = build_nonstandard_integer_type (bits, + unsignedp); } return type; }