aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2017-12-07 18:06:08 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2017-12-07 18:06:08 +0100
commit47f5f7e74920fe65f5ebe4737a9c70c34178990a (patch)
tree52e7af29d835cac01723efb893f24b7b38586c00 /gcc/tree-cfg.c
parent5d9ae53d70c72991e26648d915e7fb8e00b8e811 (diff)
downloadgcc-47f5f7e74920fe65f5ebe4737a9c70c34178990a.zip
gcc-47f5f7e74920fe65f5ebe4737a9c70c34178990a.tar.gz
gcc-47f5f7e74920fe65f5ebe4737a9c70c34178990a.tar.bz2
re PR middle-end/83164 (internal compiler error: verify_gimple failed)
PR middle-end/83164 * tree-cfg.c (verify_gimple_assign_binary): Don't require types_compatible_p, just that TYPE_MODE is the same. * gcc.c-torture/compile/pr83164.c: New test. From-SVN: r255470
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r--gcc/tree-cfg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index e313df9..4d09b2c 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -4007,7 +4007,9 @@ verify_gimple_assign_binary (gassign *stmt)
{
if (!POINTER_TYPE_P (rhs1_type)
|| !POINTER_TYPE_P (rhs2_type)
- || !types_compatible_p (rhs1_type, rhs2_type)
+ /* Because we special-case pointers to void we allow difference
+ of arbitrary pointers with the same mode. */
+ || TYPE_MODE (rhs1_type) != TYPE_MODE (rhs2_type)
|| TREE_CODE (lhs_type) != INTEGER_TYPE
|| TYPE_UNSIGNED (lhs_type)
|| TYPE_PRECISION (lhs_type) != TYPE_PRECISION (rhs1_type))