optc-gen.awk: Always remove type from Variable entry before recording in var_seen.
authorJoseph Myers <joseph@codesourcery.com>
Mon, 4 Apr 2011 14:18:31 +0000 (15:18 +0100)
committerJoseph Myers <jsm28@gcc.gnu.org>
Mon, 4 Apr 2011 14:18:31 +0000 (15:18 +0100)
* optc-gen.awk: Always remove type from Variable entry before
recording in var_seen.

From-SVN: r171938

gcc/ChangeLog
gcc/optc-gen.awk

index 72735b898320b4225d91a8084ea8547e7b3ef411..2251adc621be15e8606f3cd7ab848353d172646a 100644 (file)
@@ -1,3 +1,8 @@
+2011-04-04  Joseph Myers  <joseph@codesourcery.com>
+
+       * optc-gen.awk: Always remove type from Variable entry before
+       recording in var_seen.
+
 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
 
        * cfghooks.c (tidy_fallthru_edges): Add ??? comment.
index a821c648d37d8fee336ebe043d7dd405e77c729a..503bc6b87f976401ed46e6938aeb9c73329cb4e7 100644 (file)
@@ -202,14 +202,15 @@ for (i = 0; i < n_extra_vars; i++) {
        init = extra_vars[i]
        if (var ~ "=" ) {
                sub(".*= *", "", init)
-               sub(" *=.*", "", var)
-               sub("^.*[ *]", "", var)
-               sub("\\[.*\\]$", "", var)
        } else {
                init = "0"
        }
-       var_seen[var] = 1
-       print "  " init ", /* " var " */"
+       sub(" *=.*", "", var)
+       name = var
+       sub("^.*[ *]", "", name)
+       sub("\\[.*\\]$", "", name)
+       var_seen[name] = 1
+       print "  " init ", /* " name " */"
 }
 for (i = 0; i < n_opts; i++) {
        if (flag_set_p("Save", flags[i]))