From: kenner@vlsi1.ultra.nyu.edu (Richard Kenner)
To: dnovillo@redhat.com
Cc: gcc@gcc.gnu.org
Subject: Re: Q about Ada and value ranges in types
Date: Tue, 03 May 2005 01:46:00 -0000 [thread overview]
Message-ID: <10505030146.AA26099@vlsi1.ultra.nyu.edu> (raw)
I am tracking an ICE in VRP that triggers only in Ada. Given
this:
1 D.1480_32 = nam_30 - 300000361;
2 if (D.1480_32 <= 1) goto <L112>; else goto <L52>;
3 <L112>:;
4 D.1480_94 = ASSERT_EXPR <D.1480_32, D.1480_32 <= 1>;
5 goto <bb 50> (<L57>);
for name D.1480_94. However, the type of D.1480 is:
(gdb) ptu type
const types__name_id___XDLU_300000000__399999999
<integer_type 0xf6f3f360 types__name_id___XDLU_300000000__399999999
type <integer_type 0xf6f3cec4 types__Tname_idB sizes-gimplified visited
[ ... ]
min <integer_cst 0xf6f40060 300000000>
max <integer_cst 0xf6f40090 399999999>
RM size <integer_cst 0xf6ee13f0 32>>
My question is, is Ada emitting an always-false predicate in line
#2? Or is it a bug?
You're not showing where this comes from, so it's hard to say. However
D.1480 is created by the gimplifier, not the Ada front end. There could
easily be a typing problem in the tree there (e.g., that of the subtraction),
but I can't tell for sure.
If the Ada language allows that kind of runtime check, then my
fix to VRP will be different.
I don't see it as a language issue: I'd argue that the tree in statement 2
is invalid given the typing. That should be true for any language.
(Note that there's a system problem and email to this address won't be
received until tomorrow afternoon.)
next reply other threads:[~2005-05-03 1:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-03 1:46 Richard Kenner [this message]
2005-05-03 14:16 ` Diego Novillo
-- strict thread matches above, loose matches on Subject: below --
2005-06-28 2:28 Richard Kenner
2005-06-27 20:48 Richard Kenner
2005-06-27 23:36 ` James A. Morrison
2005-05-03 22:20 Richard Kenner
2005-05-04 0:40 ` Diego Novillo
2005-05-02 15:26 Diego Novillo
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=10505030146.AA26099@vlsi1.ultra.nyu.edu \
--to=kenner@vlsi1.ultra.nyu.edu \
--cc=dnovillo@redhat.com \
--cc=gcc@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).