]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/stor-layout.c
Merge in trunk.
[thirdparty/gcc.git] / gcc / stor-layout.c
index eed3b22e8df85e312c20956dda6a81b428fbc6a9..ef5d74087cce1ecb30b0941cb35665892b989ae8 100644 (file)
@@ -383,6 +383,7 @@ int_mode_for_mode (enum machine_mode mode)
     case MODE_VECTOR_ACCUM:
     case MODE_VECTOR_UFRACT:
     case MODE_VECTOR_UACCUM:
+    case MODE_POINTER_BOUNDS:
       mode = mode_for_size (GET_MODE_BITSIZE (mode), MODE_INT, 0);
       break;
 
@@ -606,14 +607,10 @@ layout_decl (tree decl, unsigned int known_align)
 
          /* See if we can use an ordinary integer mode for a bit-field.
             Conditions are: a fixed size that is correct for another mode,
-            occupying a complete byte or bytes on proper boundary,
-            and not -fstrict-volatile-bitfields.  If the latter is set,
-            we unfortunately can't check TREE_THIS_VOLATILE, as a cast
-            may make a volatile object later.  */
+            occupying a complete byte or bytes on proper boundary.  */
          if (TYPE_SIZE (type) != 0
              && TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST
-             && GET_MODE_CLASS (TYPE_MODE (type)) == MODE_INT
-             && flag_strict_volatile_bitfields <= 0)
+             && GET_MODE_CLASS (TYPE_MODE (type)) == MODE_INT)
            {
              enum machine_mode xmode
                = mode_for_size_tree (DECL_SIZE (decl), MODE_INT, 1);
@@ -2129,6 +2126,14 @@ layout_type (tree type)
       SET_TYPE_MODE (type, VOIDmode);
       break;
 
+    case POINTER_BOUNDS_TYPE:
+      SET_TYPE_MODE (type,
+                     mode_for_size (TYPE_PRECISION (type),
+                                   MODE_POINTER_BOUNDS, 0));
+      TYPE_SIZE (type) = bitsize_int (GET_MODE_BITSIZE (TYPE_MODE (type)));
+      TYPE_SIZE_UNIT (type) = size_int (GET_MODE_SIZE (TYPE_MODE (type)));
+      break;
+
     case OFFSET_TYPE:
       TYPE_SIZE (type) = bitsize_int (POINTER_SIZE);
       TYPE_SIZE_UNIT (type) = size_int (POINTER_SIZE / BITS_PER_UNIT);