tree-inline.c (remap_type_1): Change asserts on TYPE_SIZE[_UNIT] to allow for free...
authorRichard Biener <rguenther@suse.de>
Tue, 22 Aug 2017 11:10:28 +0000 (11:10 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 22 Aug 2017 11:10:28 +0000 (11:10 +0000)
2017-08-22  Richard Biener  <rguenther@suse.de>

* tree-inline.c (remap_type_1): Change asserts on TYPE_SIZE[_UNIT]
to allow for free-lang-data replacements similar to verify_type_variant.

From-SVN: r251274

gcc/ChangeLog
gcc/tree-inline.c

index 6ecd62601a1d38844b01ebc81ff9d0e7a1e15907..bcd868462fcd558de36f84a034c5cf9865d9a3d5 100644 (file)
@@ -1,3 +1,8 @@
+2017-08-22  Richard Biener  <rguenther@suse.de>
+
+       * tree-inline.c (remap_type_1): Change asserts on TYPE_SIZE[_UNIT]
+       to allow for free-lang-data replacements similar to verify_type_variant.
+
 2017-08-22  Richard Sandiford  <richard.sandiford@linaro.org>
            Alan Hayward  <alan.hayward@arm.com>
            David Sherwood  <david.sherwood@arm.com>
index affde64d2fdba719fabe7650a8b8eabf7da602ea..1652f2f916aabcb0ac453f6d1059c72b4e2416f2 100644 (file)
@@ -554,9 +554,16 @@ remap_type_1 (tree type, copy_body_data *id)
   /* All variants of type share the same size, so use the already remaped data.  */
   if (TYPE_MAIN_VARIANT (new_tree) != new_tree)
     {
-      gcc_checking_assert (TYPE_SIZE (type) == TYPE_SIZE (TYPE_MAIN_VARIANT (type)));
-      gcc_checking_assert (TYPE_SIZE_UNIT (type) == TYPE_SIZE_UNIT (TYPE_MAIN_VARIANT (type)));
-
+      tree s = TYPE_SIZE (type);
+      tree mvs = TYPE_SIZE (TYPE_MAIN_VARIANT (type));
+      tree su = TYPE_SIZE_UNIT (type);
+      tree mvsu = TYPE_SIZE_UNIT (TYPE_MAIN_VARIANT (type));
+      gcc_checking_assert ((TREE_CODE (s) == PLACEHOLDER_EXPR
+                           && (TREE_CODE (mvs) == PLACEHOLDER_EXPR))
+                          || s == mvs);
+      gcc_checking_assert ((TREE_CODE (su) == PLACEHOLDER_EXPR
+                           && (TREE_CODE (mvsu) == PLACEHOLDER_EXPR))
+                          || su == mvsu);
       TYPE_SIZE (new_tree) = TYPE_SIZE (TYPE_MAIN_VARIANT (new_tree));
       TYPE_SIZE_UNIT (new_tree) = TYPE_SIZE_UNIT (TYPE_MAIN_VARIANT (new_tree));
     }