public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ada/102450] GCC error: in set_min_and_max_values_for_integral_type, at stor-layout.c:2851
Date: Mon, 27 Sep 2021 06:10:32 +0000	[thread overview]
Message-ID: <bug-102450-4-CKDIoNtBOS@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-102450-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102450

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW
                 CC|                            |ebotcazou at gcc dot gnu.org,
                   |                            |rguenth at gcc dot gnu.org

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
Yeah, type_for_size should return any of the _standard_ integer types with the
given precision/size.  It is not an replacement for random integer type
construction.

OTOH the gimple folding code doing

              tree type = lang_hooks.types.type_for_size (ilen * 8, 1);

could eventually instead use mode_for_size (and check that size == precision)
and then type_for_mode.  The code already looks at the mode for verification
and it would avoid the Ada issue at least (I still think the Ada FE shouldn't
ICE when being passed not supported precisions):

              if (type
                  && is_a <scalar_int_mode> (TYPE_MODE (type), &mode)
                  && GET_MODE_SIZE (mode) * BITS_PER_UNIT == ilen * 8
                  && have_insn_for (SET, mode)

Eric?

  parent reply	other threads:[~2021-09-27  6:10 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-22 12:30 [Bug ada/102450] New: " danglin at gcc dot gnu.org
2021-09-22 13:14 ` [Bug ada/102450] " rguenth at gcc dot gnu.org
2021-09-22 13:47 ` dave.anglin at bell dot net
2021-09-22 15:04 ` dave.anglin at bell dot net
2021-09-24  9:44 ` rdapp at linux dot ibm.com
2021-09-24 14:37 ` rdapp at linux dot ibm.com
2021-09-24 15:24 ` rearnsha at gcc dot gnu.org
2021-09-24 15:29 ` rearnsha at gcc dot gnu.org
2021-09-24 15:41 ` rearnsha at gcc dot gnu.org
2021-09-27  6:10 ` rguenth at gcc dot gnu.org [this message]
2021-09-27 10:34 ` ebotcazou at gcc dot gnu.org
2021-09-27 10:37 ` rguenth at gcc dot gnu.org
2021-09-27 10:46 ` ebotcazou at gcc dot gnu.org
2021-09-27 11:03 ` ebotcazou at gcc dot gnu.org
2021-09-27 11:26 ` rguenth at gcc dot gnu.org
2021-09-27 11:29 ` rguenth at gcc dot gnu.org
2021-09-27 11:48 ` rguenth at gcc dot gnu.org
2021-09-27 13:04 ` cvs-commit at gcc dot gnu.org
2021-09-27 13:05 ` rguenth 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-102450-4-CKDIoNtBOS@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: link
Be 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).