public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "spop at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/47653] [4.6 Regression] gcc.c-torture/execute/930614-2.c FAILs with -fstack-check=generic -fgraphite-identity
Date: Fri, 18 Feb 2011 18:50:00 -0000	[thread overview]
Message-ID: <bug-47653-4-pgCSbF4Ocx@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-47653-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47653

--- Comment #4 from Sebastian Pop <spop at gcc dot gnu.org> 2011-02-18 18:28:13 UTC ---
http://gcc.gnu.org/viewcvs?view=revision&revision=168211
removed all the uses of int_cst_value and replaced them with
tree_int_to_gmp, and here is what happens:

Breakpoint 5, scan_tree_for_params_right_scev (s=0x190a300, e=0x7ffff7ec96b8,
var=1, expr=0x190cb20) at ../../gcc/graphite-sese-to-poly.c:637
(gdb) p e
$1 = (tree) 0x7ffff7ec96b8
(gdb) pgs
4294967295

(gdb) p int_cst_value (e)
$2 = -1
(gdb) p e
$3 = (tree) 0x7ffff7ec96b8
(gdb) pt
 <integer_cst 0x7ffff7ec96b8 type <integer_type 0x7ffff7edc540 unsigned int>
constant 4294967295>

The reason int_cst_value returns -1 is that it sign extends the value:

  unsigned HOST_WIDE_INT val = TREE_INT_CST_LOW (x);
      bool negative = ((val >> (bits - 1)) & 1) != 0;
      if (negative)
    val |= (~(unsigned HOST_WIDE_INT) 0) << (bits - 1) << 1;


  parent reply	other threads:[~2011-02-18 18:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-09  0:43 [Bug middle-end/47653] New: " zsojka at seznam dot cz
2011-02-09  4:02 ` [Bug middle-end/47653] " hjl.tools at gmail dot com
2011-02-18 16:04 ` law at redhat dot com
2011-02-18 16:59 ` spop at gcc dot gnu.org
2011-02-18 18:50 ` spop at gcc dot gnu.org [this message]
2011-03-25 19:56 ` [Bug middle-end/47653] [4.6/4.7 " jakub at gcc dot gnu.org
2011-06-27 15:56 ` jakub at gcc dot gnu.org
2011-06-29 21:19 ` spop at gcc dot gnu.org
2011-07-25 17:46 ` spop at gcc dot gnu.org
2011-07-25 17:48 ` spop at gcc dot gnu.org
2011-07-26 18:49 ` spop at gcc dot gnu.org
2011-07-26 18:50 ` spop at gcc dot gnu.org
2011-07-26 18:57 ` spop at gcc dot gnu.org
2011-08-09 15:52 ` ro at gcc dot gnu.org
2011-08-11 13:45 ` matz 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-47653-4-pgCSbF4Ocx@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).