summaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-03-01 12:26:20 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-03-01 12:26:20 +0000
commit5c332a23387e660b2c7776558d2748f6d89d76a0 (patch)
tree8927504f6ed5897b3fc5e015bb2abdb29559eb0e /gcc/tree-cfg.c
parent47018d7bb5a2023c9f0cb9227383b5105b3f2054 (diff)
downloadgcc-5c332a23387e660b2c7776558d2748f6d89d76a0.tar.gz
2012-03-01 Richard Guenther <rguenther@suse.de>
PR middle-end/52443 * tree-cfg.c (verify_gimple_assign_unary): Allow any conversions from integral types to pointer types. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184739 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r--gcc/tree-cfg.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 66ea9285e6d..9f75650d7a7 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -3340,15 +3340,12 @@ verify_gimple_assign_unary (gimple stmt)
{
CASE_CONVERT:
{
- /* Allow conversions between integral types and pointers only if
+ /* Allow conversions from pointer type to integral type only if
there is no sign or zero extension involved.
For targets were the precision of ptrofftype doesn't match that
- of pointers we need to allow arbitrary conversions from and
- to ptrofftype. */
+ of pointers we need to allow arbitrary conversions to ptrofftype. */
if ((POINTER_TYPE_P (lhs_type)
- && INTEGRAL_TYPE_P (rhs1_type)
- && (TYPE_PRECISION (lhs_type) >= TYPE_PRECISION (rhs1_type)
- || ptrofftype_p (rhs1_type)))
+ && INTEGRAL_TYPE_P (rhs1_type))
|| (POINTER_TYPE_P (rhs1_type)
&& INTEGRAL_TYPE_P (lhs_type)
&& (TYPE_PRECISION (rhs1_type) >= TYPE_PRECISION (lhs_type)