re PR other/57195 (Mode attributes with specific mode iterator can not be used as...
authorMichael Collison <michael.collison@linaro.org>
Thu, 24 Sep 2015 23:26:50 +0000 (23:26 +0000)
committerMichael Collison <collison@gcc.gnu.org>
Thu, 24 Sep 2015 23:26:50 +0000 (23:26 +0000)
2015-09-24  Michael Collison  <michael.collison@linaro.org>

PR other/57195
* read-md.c (read_name): Allow mode iterators inside angle
brackets in rtl expressions.

From-SVN: r228102

gcc/ChangeLog
gcc/read-md.c

index e951934..29c4245 100644 (file)
@@ -1,3 +1,9 @@
+2015-09-24  Michael Collison  <michael.collison@linaro.org>
+
+       PR other/57195
+       * read-md.c (read_name): Allow mode iterators inside angle
+       brackets in rtl expressions.
+
 2015-09-24  Vladimir Makarov  <vmakarov@redhat.com>
 
        PR target/61578
index 9f158ec..e26e4a6 100644 (file)
@@ -399,20 +399,31 @@ read_name (struct md_name *name)
 {
   int c;
   size_t i;
+  int angle_bracket_depth;
 
   c = read_skip_spaces ();
 
   i = 0;
+  angle_bracket_depth = 0;
   while (1)
     {
+      if (c == '<')
+       angle_bracket_depth++;
+
+      if ((c == '>') && (angle_bracket_depth > 0))
+         angle_bracket_depth--;
+
       if (c == ' ' || c == '\n' || c == '\t' || c == '\f' || c == '\r'
          || c == EOF)
        break;
-      if (c == ':' || c == ')' || c == ']' || c == '"' || c == '/'
-         || c == '(' || c == '[')
+      if (angle_bracket_depth == 0)
        {
-         unread_char (c);
-         break;
+         if (c == ':' || c == ')' || c == ']'
+             || c == '"' || c == '/' || c == '(' || c == '[')
+           {
+             unread_char (c);
+             break;
+           }
        }
 
       if (i == sizeof (name->buffer) - 1)