dumpfile.c (opt_info_switch_p_1): Ignore '-' if it appears after '='.
authorUlrich Drepper <drepper@redhat.com>
Wed, 30 Jan 2019 07:18:22 +0000 (07:18 +0000)
committerUlrich Drepper <drepper@gcc.gnu.org>
Wed, 30 Jan 2019 07:18:22 +0000 (07:18 +0000)
* dumpfile.c (opt_info_switch_p_1): Ignore '-' if it appears
after '='.

From-SVN: r268380

gcc/ChangeLog
gcc/dumpfile.c

index d040d97..1b9c8e4 100644 (file)
@@ -1,3 +1,8 @@
+2019-01-30  Ulrich Drepper  <drepper@redhat.com>
+
+       * dumpfile.c (opt_info_switch_p_1): Ignore '-' if it appears
+       after '='.
+
 2019-01-29  Martin Sebor  <msebor@redhat.com>
 
        PR c/88956
index c92bba8..14b6dfe 100644 (file)
@@ -1915,10 +1915,9 @@ opt_info_switch_p_1 (const char *arg, dump_flags_t *flags,
       end_ptr = strchr (ptr, '-');
       eq_ptr = strchr (ptr, '=');
 
-      if (eq_ptr && !end_ptr)
+      if (eq_ptr && (!end_ptr || eq_ptr < end_ptr))
         end_ptr = eq_ptr;
-
-      if (!end_ptr)
+      else if (!end_ptr)
        end_ptr = ptr + strlen (ptr);
       length = end_ptr - ptr;