diff --git a/gcc/dumpfile.c b/gcc/dumpfile.c index 9a5496a18e8..8e53aeff340 100644 --- a/gcc/dumpfile.c +++ b/gcc/dumpfile.c @@ -1800,7 +1800,7 @@ parse_dump_option (const char *option_value, const char **pos_p) end_ptr = strchr (ptr, '-'); eq_ptr = strchr (ptr, '='); - if (eq_ptr && !end_ptr) + if (eq_ptr && (!end_ptr || end_ptr > eq_ptr)) end_ptr = eq_ptr; if (!end_ptr)