This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Unreviewed patch - Fix PR tree-optimization/17512.



On Sep 22, 2004, at 1:43 PM, Roger Sayle wrote:



On Wed, 22 Sep 2004, Andrew Pinski wrote:
Could you send me the preprocessed source for this bug?  Since I was
the one who added the case where the types differ, I would like to fix
this bug.

It'll take me a few minutes to add the abort to build2 in tree.c and start a bootstrap to identify which file in libstdc++-v3 triggered the failure. Reproduced it! I can now get it to trigger with c-decl.c in stage2. The preprocessed source file is attached.

It was a thinko on my part when I wrote this code.


OK? Bootstrapped and tested on powerpc-apple-darwin.

Thanks,
Andrew Pinski


ChangeLog: * tree-ssa-phiopt.c (conditional_replacement): Use the correct type with the copy of the conditional.

Index: tree-ssa-phiopt.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-phiopt.c,v
retrieving revision 2.14
diff -u -p -r2.14 tree-ssa-phiopt.c
--- tree-ssa-phiopt.c	18 Sep 2004 19:47:10 -0000	2.14
+++ tree-ssa-phiopt.c	22 Sep 2004 23:56:45 -0000
@@ -344,11 +344,11 @@ conditional_replacement (basic_block bb,
       if (!COMPARISON_CLASS_P (old_result))
 	return false;

-      new1 = build (TREE_CODE (old_result), TREE_TYPE (result),
+      new1 = build (TREE_CODE (old_result), TREE_TYPE (old_result),
 		    TREE_OPERAND (old_result, 0),
 		    TREE_OPERAND (old_result, 1));

- new1 = build (MODIFY_EXPR, TREE_TYPE (result), new_var, new1);
+ new1 = build (MODIFY_EXPR, TREE_TYPE (old_result), new_var, new1);
bsi_insert_after (&bsi, new1, BSI_NEW_STMT);
}




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]