http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48317
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-09-06 13:17:53 UTC --- Author: rguenth Date: Tue Sep 6 13:17:50 2011 New Revision: 178595 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=178595 Log: 2011-09-06 Richard Guenther <rguent...@suse.de> PR tree-optimization/48317 * tree-ssa-sccvn.h (struct vn_nary_op_s): Make op a true trailing array. (sizeof_vn_nary_op): New inline function. (vn_nary_op_lookup_pieces): Adjust. (vn_nary_op_insert_pieces): Likewise. * tree-ssa-sccvn.c (vn_nary_op_eq): Also compare the length. (init_vn_nary_op_from_pieces): Adjust signature. Deal with any number of operands. (vn_nary_length_from_stmt): New function. (init_vn_nary_op_from_stmt): Adjust for CONSTRUCTOR handling. (vn_nary_op_lookup_pieces): Adjust signature and allocate properly sized temporary. (vn_nary_op_lookup): Likewise. (vn_nary_op_lookup_stmt): Likewise. (vn_nary_op_insert_into): Likewise. (vn_nary_op_insert_stmt): Likewise. (visit_use): Handle CONSTRUCTOR as nary. * tree-ssa-pre.c (phi_translate_1): Adjust. (create_expression_by_pieces): Likewise. (compute_avail): Likewise. * gcc.dg/tree-ssa/ssa-fre-31.c: New testcase. Added: trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-31.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-ssa-pre.c trunk/gcc/tree-ssa-sccvn.c trunk/gcc/tree-ssa-sccvn.h