Don't build insn-extract.o with rtl checking
[gcc.git] / gcc / attribs.c
index 3f6ec3d3aa39bfdc5ccfb840b07fef487d36fdc0..a6f6b70e39e199a9b08e943bb9598bf4d5b15da7 100644 (file)
@@ -2049,6 +2049,8 @@ init_attr_rdwr_indices (rdwr_map *rwm, tree attrs)
 
       /* The (optional) list of VLA bounds.  */
       tree vblist = TREE_CHAIN (mode);
+      if (vblist)
+       vblist = TREE_VALUE (vblist);
 
       mode = TREE_VALUE (mode);
       if (TREE_CODE (mode) != STRING_CST)
@@ -2107,6 +2109,7 @@ init_attr_rdwr_indices (rdwr_map *rwm, tree attrs)
                     is followed by a comma and a dollar sign its bound is
                     on the list.  Otherwise it's a VLA with an unspecified
                     bound.  */
+                 acc.static_p = p[-2] == 's';
                  acc.minsize = HOST_WIDE_INT_M1U;
                }
 
@@ -2270,11 +2273,11 @@ attr_access::array_as_string (tree type) const
             bound is nonconstant and whose access string has "$]" in it)
             extract the bound expression from SIZE.  */
          const char *p = end;
-         for ( ; *p-- != ']'; );
+         for ( ; p != str && *p-- != ']'; );
          if (*p == '$')
            index_type = build_index_type (TREE_VALUE (size));
        }
-      else  if (minsize)
+      else if (minsize)
        index_type = build_index_type (size_int (minsize - 1));
 
       tree arat = NULL_TREE;