re PR tree-optimization/39713 (ICE in get_expr_value_id)
2009-04-11 Richard Guenther <rguenther@suse.de> PR tree-optimization/39713 * tree-ssa-sccvn.c (vn_get_expr_for): Make sure built reference trees have SSA_NAME operands. * g++.dg/torture/pr39713.C: New testcase. From-SVN: r145952
This commit is contained in:
parent
db823f2ffa
commit
621a1d8545
|
@ -1,3 +1,9 @@
|
|||
2009-04-11 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/39713
|
||||
* tree-ssa-sccvn.c (vn_get_expr_for): Make sure built
|
||||
reference trees have SSA_NAME operands.
|
||||
|
||||
2009-04-10 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
Backport from mainline:
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2009-04-11 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/39713
|
||||
* g++.dg/torture/pr39713.C: New testcase.
|
||||
|
||||
2009-04-10 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
Backport from mainline:
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
/* { dg-do compile } */
|
||||
|
||||
template <typename To, typename From>
|
||||
static inline To
|
||||
bitwise_cast (From from)
|
||||
{
|
||||
union
|
||||
{
|
||||
From f;
|
||||
To t;
|
||||
} u;
|
||||
u.f = from;
|
||||
return u.t;
|
||||
}
|
||||
|
||||
extern void foo (unsigned char *);
|
||||
|
||||
double
|
||||
bar ()
|
||||
{
|
||||
unsigned char b[sizeof (unsigned long long)];
|
||||
foo (b);
|
||||
return bitwise_cast<double> (*(unsigned long long *) b);
|
||||
}
|
||||
|
|
@ -257,9 +257,10 @@ vn_get_expr_for (tree name)
|
|||
switch (TREE_CODE_CLASS (gimple_assign_rhs_code (def_stmt)))
|
||||
{
|
||||
case tcc_reference:
|
||||
if (gimple_assign_rhs_code (def_stmt) == VIEW_CONVERT_EXPR
|
||||
|| gimple_assign_rhs_code (def_stmt) == REALPART_EXPR
|
||||
|| gimple_assign_rhs_code (def_stmt) == IMAGPART_EXPR)
|
||||
if ((gimple_assign_rhs_code (def_stmt) == VIEW_CONVERT_EXPR
|
||||
|| gimple_assign_rhs_code (def_stmt) == REALPART_EXPR
|
||||
|| gimple_assign_rhs_code (def_stmt) == IMAGPART_EXPR)
|
||||
&& TREE_CODE (gimple_assign_rhs1 (def_stmt)) == SSA_NAME)
|
||||
expr = fold_build1 (gimple_assign_rhs_code (def_stmt),
|
||||
gimple_expr_type (def_stmt),
|
||||
TREE_OPERAND (gimple_assign_rhs1 (def_stmt), 0));
|
||||
|
|
Loading…
Reference in New Issue