This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH]: Fix 1 libstdc++ failure
Let me know if this fixes it please (the trie regressions remain, i'm
working on them).
On Mon, Jul 14, 2008 at 4:47 PM, Daniel Berlin <dberlin@dberlin.org> wrote:
> On Mon, Jul 14, 2008 at 4:40 PM, Paolo Carlini <paolo.carlini@oracle.com> wrote:
>> On Jul 14, 2008, at 9:44 PM, Daniel Berlin wrote:
>>>
>>> I do have the complete localedata.
>>> I don't doubt the failure exists, I am just trying to get it to
>>> reproduce so i can fix it.
>>
>> Ok, I understand, sorry if my reply appeared a bit "aggressive", but really
>> you should be using a pretty uncommon x86_64-linux machine.
>
> I'm running ubuntu hardy 8.04 with absolutely nothing special on the
> system (IE everything including mpfr/etc installed from packages).
>
>
>
Index: tree-ssa-pre.c
===================================================================
--- tree-ssa-pre.c (revision 137803)
+++ tree-ssa-pre.c (working copy)
@@ -1009,7 +1009,7 @@
a constant. */
static tree
-get_constant_for_value_id (unsigned int v)
+get_constant_for_value_id (unsigned int v, tree type)
{
if (value_id_constant_p (v))
{
@@ -1020,7 +1020,8 @@
FOR_EACH_EXPR_ID_IN_SET (exprset, i, bi)
{
pre_expr expr = expression_for_id (i);
- if (expr->kind == CONSTANT)
+ if (expr->kind == CONSTANT
+ && TREE_TYPE (PRE_EXPR_CONSTANT (expr)) == type)
return PRE_EXPR_CONSTANT (expr);
}
}
@@ -1064,8 +1065,10 @@
pre_expr rep1 = get_or_alloc_expr_for (naryop1);
unsigned int vrep0 = get_expr_value_id (rep0);
unsigned int vrep1 = get_expr_value_id (rep1);
- tree const0 = get_constant_for_value_id (vrep0);
- tree const1 = get_constant_for_value_id (vrep1);
+ tree const0 = get_constant_for_value_id (vrep0,
+ TREE_TYPE (nary->op[0]));
+ tree const1 = get_constant_for_value_id (vrep1,
+ TREE_TYPE (nary->op[1]));
tree result = NULL;
if (const0 && const1)
{
@@ -1087,7 +1090,8 @@
tree naryop0 = nary->op[0];
pre_expr rep0 = get_or_alloc_expr_for (naryop0);
unsigned int vrep0 = get_expr_value_id (rep0);
- tree const0 = get_constant_for_value_id (vrep0);
+ tree const0 = get_constant_for_value_id (vrep0,
+ TREE_TYPE (nary->op[0]));
tree result = NULL;
if (const0)
{