From: Eric Botcazou <ebotcazou@adacore.com>
To: Richard Guenther <rguenther@suse.de>
Cc: gcc-patches@gcc.gnu.org, Arnaud Charlet <charlet@adacore.com>
Subject: Re: [PATCH] Keep lattice abstract in the SSA propagator, substitue lattice values at defs
Date: Sun, 08 Aug 2010 08:01:00 -0000 [thread overview]
Message-ID: <201008081000.41310.ebotcazou@adacore.com> (raw)
In-Reply-To: <alpine.LNX.2.00.1008041437130.25856@zhemvz.fhfr.qr>
[-- Attachment #1: Type: text/plain, Size: 935 bytes --]
> D.2544_253 = prephitmp.53_302 + 2147483647;
> D.2553_254 = (size_type) D.2544_253;
The signed integer overflow is introduced during the reassoc1 pass. For the
attached reduced testcase, we start from:
<bb 43>:
# L41b_3 = PHI <L41b_213(42), 0(41)>
L43b_216 = L41b_3 + L39b_195;
if (L43b_216 <= 0)
goto <bb 44>;
else
goto <bb 45>;
<bb 44>:
Invalid sum of outgoing probabilities 0.0%
.gnat_rcheck_10 ("c52102b.adb", 44);
<bb 45>:
D.2615_217 = L43b_216 + -1;
iftmp.30_218 = D.2615_217 + -2147483648;
D.2624_225 = (size_type) iftmp.30_218;
and we go to:
<bb 43>:
# L41b_3 = PHI <L41b_213(42), 0(41)>
L43b_216 = L41b_3 + L39b_195;
if (L43b_216 <= 0)
goto <bb 44>;
else
goto <bb 45>;
<bb 44>:
Invalid sum of outgoing probabilities 0.0%
.gnat_rcheck_10 ("c52102b.adb", 44);
<bb 45>:
iftmp.30_218 = L43b_216 + 2147483647;
D.2624_225 = (size_type) iftmp.30_218;
--
Eric Botcazou
[-- Attachment #2: c52102b.adb --]
[-- Type: text/x-adasrc, Size: 1934 bytes --]
WITH REPORT; USE REPORT;
PROCEDURE C52102B IS
IDENT_INT_1 : INTEGER := IDENT_INT (1);
IDENT_INT_2 : INTEGER := IDENT_INT (2);
IDENT_INT_3 : INTEGER := IDENT_INT (3);
IDENT_INT_4 : INTEGER := IDENT_INT (4);
IDENT_INT_5 : INTEGER := IDENT_INT (5);
IDENT_INT_6 : INTEGER := IDENT_INT (6);
IDENT_INT_8 : INTEGER := IDENT_INT (8);
IDENT_INT_9 : INTEGER := IDENT_INT (9);
BEGIN
DECLARE
A : ARRAY( 1..IDENT_INT_4 ) OF INTEGER;
BEGIN
A := ( 11 , 12 , 13 , 14 );
A := ( 1 , A(IDENT_INT_1) , A(IDENT_INT_2) ,
A(IDENT_INT_1) );
IF A /= ( 1 , 11 , 12 , 11 ) THEN
raise Program_Error;
END IF;
A := ( 11 , 12 , 13 , 14 );
A := ( A(IDENT_INT_4) , A(IDENT_INT_3) ,
A(IDENT_INT_4) , 1 );
IF A /= ( 14 , 13 , 14 , 1 ) THEN
raise Program_Error;
END IF;
END;
DECLARE
TYPE ARR IS ARRAY (INTEGER RANGE <>) OF INTEGER;
A : ARR (1..10);
BEGIN
A := ( 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 );
A := 0 & A(IDENT_INT_1..IDENT_INT_2) &
A(IDENT_INT_1..IDENT_INT_2) &
A(IDENT_INT_1..IDENT_INT_5);
IF A /= ( 0 , 1 , 2 , 1 , 2 , 1 , 2 , 3 , 4 , 5 )
THEN
raise Program_Error;
END IF;
A := ( 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 );
A := A(IDENT_INT_6..IDENT_INT_9) &
A(IDENT_INT_8..IDENT_INT_9) &
A(IDENT_INT_8..IDENT_INT_9) & 0 & 0;
IF A /= ( 6 , 7 , 8 , 9 , 8 , 9 , 8 , 9 , 0 , 0 )
THEN
raise Program_Error;
END IF;
END;
END C52102B;
next prev parent reply other threads:[~2010-08-08 8:01 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-04 12:22 Richard Guenther
2010-08-04 12:26 ` Arnaud Charlet
2010-08-04 12:29 ` Richard Guenther
2010-08-04 12:31 ` Arnaud Charlet
2010-08-04 12:49 ` Richard Guenther
2010-08-04 12:57 ` Eric Botcazou
2010-08-04 12:58 ` Richard Guenther
2010-08-04 13:27 ` Eric Botcazou
2010-08-08 8:01 ` Eric Botcazou [this message]
2010-08-08 8:44 ` Richard Guenther
2010-08-08 12:09 ` Paolo Bonzini
2010-08-08 12:12 ` Paolo Bonzini
2010-08-08 12:28 ` Richard Guenther
2010-08-08 12:37 ` Richard Guenther
2010-08-08 13:36 ` Richard Guenther
2010-08-08 22:46 ` Eric Botcazou
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=201008081000.41310.ebotcazou@adacore.com \
--to=ebotcazou@adacore.com \
--cc=charlet@adacore.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=rguenther@suse.de \
/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).