This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix for PR 15119
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 25 Apr 04 19:55:55 EDT
- Subject: Fix for PR 15119
The following is the trivial for for PR c++ 15119. Only lightly tested
since it adds a new case that use to abort.
Sun Apr 25 19:53:18 2004 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
PR/c++ 15119
* tree.c (substitute_placeholder_in_expr, case 4): New case,
for TARGET_EXPR.
*** tree.c 12 Apr 2004 21:25:46 -0000 1.367
--- tree.c 25 Apr 2004 23:50:44 -0000
*************** substitute_placeholder_in_expr (tree exp
*** 2054,2058 ****
{
enum tree_code code = TREE_CODE (exp);
! tree op0, op1, op2;
/* If this is a PLACEHOLDER_EXPR, see if we find a corresponding type
--- 2054,2058 ----
{
enum tree_code code = TREE_CODE (exp);
! tree op0, op1, op2, op3;
/* If this is a PLACEHOLDER_EXPR, see if we find a corresponding type
*************** substitute_placeholder_in_expr (tree exp
*** 2151,2154 ****
--- 2151,2167 ----
else
return fold (build3 (code, TREE_TYPE (exp), op0, op1, op2));
+
+ case 4:
+ op0 = SUBSTITUTE_PLACEHOLDER_IN_EXPR (TREE_OPERAND (exp, 0), obj);
+ op1 = SUBSTITUTE_PLACEHOLDER_IN_EXPR (TREE_OPERAND (exp, 1), obj);
+ op2 = SUBSTITUTE_PLACEHOLDER_IN_EXPR (TREE_OPERAND (exp, 2), obj);
+ op3 = SUBSTITUTE_PLACEHOLDER_IN_EXPR (TREE_OPERAND (exp, 3), obj);
+
+ if (op0 == TREE_OPERAND (exp, 0) && op1 == TREE_OPERAND (exp, 1)
+ && op2 == TREE_OPERAND (exp, 2)
+ && op3 == TREE_OPERAND (exp, 3))
+ return exp;
+ else
+ return fold (build4 (code, TREE_TYPE (exp), op0, op1, op2, op3));
default: