public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Aldy Hernandez <aldyh@redhat.com>
To: Richard Biener <richard.guenther@gmail.com>,
	GCC Mailing List <gcc@gcc.gnu.org>
Cc: Andrew MacLeod <amacleod@redhat.com>
Subject: overflow check in extract_range_from_binary_1 useless?
Date: Fri, 08 Jun 2018 10:38:00 -0000	[thread overview]
Message-ID: <276abf3c-53ab-c598-3329-16f5b39c2a5f@redhat.com> (raw)

Howdy.

Am I missing something or are these two sets identical?

> 	  /* Get the lower and upper bounds of the type.  */
> 	  if (TYPE_OVERFLOW_WRAPS (expr_type))
> 	    {
> 	      type_min = wi::min_value (prec, sgn);
> 	      type_max = wi::max_value (prec, sgn);
> 	    }
> 	  else
> 	    {
> 	      type_min = wi::to_wide (vrp_val_min (expr_type));
> 	      type_max = wi::to_wide (vrp_val_max (expr_type));
> 	    }

Isn't wi::to_wide(TYPE_MIN/MAX_VALUE) the same as wi::min/max_value, or 
is there some weird language (*cough ada*) subtlety I'm missing?

Confused.
Aldy

             reply	other threads:[~2018-06-08  9:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-08 10:38 Aldy Hernandez [this message]
2018-06-13 11:42 ` Richard Biener
2018-07-05 22:06   ` Jeff Law

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=276abf3c-53ab-c598-3329-16f5b39c2a5f@redhat.com \
    --to=aldyh@redhat.com \
    --cc=amacleod@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=richard.guenther@gmail.com \
    /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).