On 26/05/15 09:58, Richard Biener wrote:
On Fri, May 22, 2015 at 5:44 PM, Jan Hubicka <hubi...@ucw.cz> wrote:
Hi,
PR 66181 is about ICE in verify_type that complains that type and its variant 
differs
by TYPE_NO_FORCE_BLK.  This flag is kind-of internal to stor-layout.c, so the 
divergence
may not matter (I am not sure about it as C++ FE finalizes type variants 
separately
and thus it may trip to different values) but I think it is cleaner to copy it 
to all
variants like we copy other stuff set by stor layout.

Bootstrapped/regtested x86_64-linux and the patch reportedly fixes the ARM ICE
OK?

Hmm.  I think the flag should become more private to stor-layout.c and
as I read it
it matters only for the main variant (as we copy all fields computed
by it to variants).

Thus, don't stream this flag, don't compare it in LTO (nor in the type
verifier) and
eventually make the TYPE_NO_FORCE_BLK define private to stor-layout.c.

Richard.

Honza
         PR middle-end/66181
         * stor-layout.c (finalize_type_size): Also copy TYPE_NO_FORCE_BLK.
Index: stor-layout.c
===================================================================
--- stor-layout.c       (revision 222869)
+++ stor-layout.c       (working copy)
@@ -1834,6 +1834,7 @@
           TYPE_ALIGN (variant) = valign;
           TYPE_PRECISION (variant) = precision;
           SET_TYPE_MODE (variant, mode);
+         TYPE_NO_FORCE_BLK (variant) = TYPE_NO_FORCE_BLK (type);
         }
      }
  }


I've applied this after ensuring that arm-none-eabi builds finish. richi pre-approved this in a private message on IRC.

regards
Ramana

PR ipa/66181

* tree.c (verify_type_variant): Disable check for TYPE_NO_FORCE_BLK.

Index: gcc/tree.c
===================================================================
--- gcc/tree.c  (revision 223693)
+++ gcc/tree.c  (working copy)
@@ -12548,7 +12548,6 @@
        }
     }
   verify_variant_match (TYPE_PRECISION);
-  verify_variant_match (TYPE_NO_FORCE_BLK);
   verify_variant_match (TYPE_NEEDS_CONSTRUCTING);
   if (RECORD_OR_UNION_TYPE_P (t))
     verify_variant_match (TYPE_TRANSPARENT_AGGR);

Reply via email to