* [wide-int] fix 32-bit x86 builds
@ 2014-04-30 9:04 Mike Stump
2014-04-30 15:50 ` Richard Sandiford
0 siblings, 1 reply; 3+ messages in thread
From: Mike Stump @ 2014-04-30 9:04 UTC (permalink / raw)
To: gcc-patches@gcc.gnu.org Patches; +Cc: Kenneth Zadeck, Richard Sandiford
[ sorry for the dup ]
We changed the underlying type a while back, and it matters on 32-bit pointer machines that use long long for a HOST_WIDE_INT… Caught by fold-checking, thanks fold checking.
This is the tree-vrp problem, I think this was seen on arm as well.
Checked in as obvious.
Index: tree.c
===================================================================
--- tree.c (revision 209928)
+++ tree.c (working copy)
@@ -1959,7 +1959,7 @@ tree
make_int_cst_stat (int len, int ext_len MEM_STAT_DECL)
{
tree t;
- int length = (ext_len - 1) * sizeof (tree) + sizeof (struct tree_int_cst);
+ int length = (ext_len - 1) * sizeof (HOST_WIDE_INT) + sizeof (struct tree_int_cst);
gcc_assert (len);
record_node_allocation_statistics (INTEGER_CST, length);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [wide-int] fix 32-bit x86 builds
2014-04-30 9:04 [wide-int] fix 32-bit x86 builds Mike Stump
@ 2014-04-30 15:50 ` Richard Sandiford
0 siblings, 0 replies; 3+ messages in thread
From: Richard Sandiford @ 2014-04-30 15:50 UTC (permalink / raw)
To: Mike Stump; +Cc: gcc-patches@gcc.gnu.org Patches, Kenneth Zadeck
Mike Stump <mikestump@comcast.net> writes:
> We changed the underlying type a while back, and it matters on 32-bit
> pointer machines that use long long for a HOST_WIDE_INT… Caught by
> fold-checking, thanks fold checking.
>
> This is the tree-vrp problem, I think this was seen on arm as well.
Trivial follow-up to keep within the 80-column limit. Committed as obvious.
Thanks,
Richard
Index: gcc/tree.c
===================================================================
--- gcc/tree.c (revision 209936)
+++ gcc/tree.c (working copy)
@@ -1959,7 +1959,8 @@
make_int_cst_stat (int len, int ext_len MEM_STAT_DECL)
{
tree t;
- int length = (ext_len - 1) * sizeof (HOST_WIDE_INT) + sizeof (struct tree_int_cst);
+ int length = ((ext_len - 1) * sizeof (HOST_WIDE_INT)
+ + sizeof (struct tree_int_cst));
gcc_assert (len);
record_node_allocation_statistics (INTEGER_CST, length);
^ permalink raw reply [flat|nested] 3+ messages in thread
* [wide-int] fix 32-bit x86 builds
@ 2014-04-30 8:35 Mike Stump
0 siblings, 0 replies; 3+ messages in thread
From: Mike Stump @ 2014-04-30 8:35 UTC (permalink / raw)
To: gcc-patches@gcc.gnu.org Patches; +Cc: Kenneth Zadeck, Richard Sandiford
We changed the underlying type a while back, and it matters on 32-bit pointer machines that use long long for a HOST_WIDE_INT… Caught by fold-checking, thanks fold checking.
Checked in as obvious.
Index: tree.c
===================================================================
--- tree.c (revision 209928)
+++ tree.c (working copy)
@@ -1959,7 +1959,7 @@ tree
make_int_cst_stat (int len, int ext_len MEM_STAT_DECL)
{
tree t;
- int length = (ext_len - 1) * sizeof (tree) + sizeof (struct tree_int_cst);
+ int length = (ext_len - 1) * sizeof (HOST_WIDE_INT) + sizeof (struct tree_int_cst);
gcc_assert (len);
record_node_allocation_statistics (INTEGER_CST, length);
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-04-30 15:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-30 9:04 [wide-int] fix 32-bit x86 builds Mike Stump
2014-04-30 15:50 ` Richard Sandiford
-- strict thread matches above, loose matches on Subject: below --
2014-04-30 8:35 Mike Stump
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).