ICE on x86-linux but pass on x86_64-linux. 20060314 was PASS. +===========================GNAT BUG DETECTED==============================+ | 4.2.0 20060321 (experimental) (i686-pc-linux-gnu) GCC error: | | in valid_in_set, at tree-ssa-pre.c:1579 | | Error detected at c37213d.adb:240:5 |
This is definitely mine.
VIEW_CONVERT_EXPR<struct c37213d__E90b__S95b___C_PAD[D.2494:D.2496]>(*B$P_ARRAYD.2768_872)[B92b.67D.2585_1027]{lb: 1 sz: 000000004} We have a VIEW_CONVERT_EXPR here is ok, the assert is broken.
The problem is that is the following: Created value VH.637 for VIEW_CONVERT_EXPR<struct c37213d__E27b__S31b___C_PAD[D.1589:D.1591]>(*_init$P_ARRAY_101)[A28b.23_725]{lb: 1 sz: 000000004} vuses: (HEAP.76_1012) That should have been two split up into two VH's.
(In reply to comment #3) > The problem is that is the following: > Created value VH.637 for VIEW_CONVERT_EXPR<struct > c37213d__E27b__S31b___C_PAD[D.1589:D.1591]>(*_init$P_ARRAY_101)[A28b.23_725]{lb: > 1 sz: 000000004} vuses: (HEAP.76_1012) Actually 3, and it creates the VH's: Created value VH.635 for *VH.570 vuses: (HEAP.76_1012) Created value VH.636 for VIEW_CONVERT_EXPR<struct c37213d__E27b__S31b___C_PAD[D.1589:D.1591]>(VH.635) vuses: (HEAP.76_1012) Created value VH.637 for VIEW_CONVERT_EXPR<struct c37213d__E27b__S31b___C_PAD[D.1589:D.1591]>(*_init$P_ARRAY_101)[A28b.23_725]{lb: 1 sz: 000000004} vuses: (HEAP.76_1012) But does not replace it.
The problem is the follow if is being hit: 2941 /* If OP is a constant that has overflowed, do not value number 2942 this expression. */ 2943 if (CONSTANT_CLASS_P (op) 2944 && TREE_OVERFLOW (op)) Which means we don't get a VH correctly for this statement.
I think I have a fix, removing this condition as this condition predates the change for overflow constants being gimple invariant.
Full testing of my patch is happening right now. It worked for this testcase just fine.
Subject: Bug number PR tree-opt/26795 A patch for this bug has been added to the patch tracker. The mailing list url for the patch is http://gcc.gnu.org/ml/gcc-patches/2006-03/msg01422.html
Subject: Bug 26795 Author: pinskia Date: Thu Mar 23 15:09:51 2006 New Revision: 112319 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=112319 Log: 2006-03-23 Andrew Pinski <pinskia@physics.uc.edu> PR tree-opt/26795 * tree-ssa-pre.c (create_value_expr_from): Don't reject expressions which have overflowed constants. Modified: trunk/gcc/ChangeLog trunk/gcc/tree-ssa-pre.c
Fixed.