From: Michael Collison Date: Thu, 24 Sep 2015 23:26:50 +0000 (+0000) Subject: re PR other/57195 (Mode attributes with specific mode iterator can not be used as... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4fe017f67af0b6ac09c568626227460d7a1209c1;p=gcc.git re PR other/57195 (Mode attributes with specific mode iterator can not be used as mode iterators in *.md files) 2015-09-24 Michael Collison PR other/57195 * read-md.c (read_name): Allow mode iterators inside angle brackets in rtl expressions. From-SVN: r228102 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e951934a80b..29c4245ec30 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-09-24 Michael Collison + + PR other/57195 + * read-md.c (read_name): Allow mode iterators inside angle + brackets in rtl expressions. + 2015-09-24 Vladimir Makarov PR target/61578 diff --git a/gcc/read-md.c b/gcc/read-md.c index 9f158ec2b7f..e26e4a6a12f 100644 --- a/gcc/read-md.c +++ b/gcc/read-md.c @@ -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)