Message ID | 20220105134749.1639763-1-jwakely@redhat.com |
---|---|
State | New |
Headers | show |
Series | [committed] libstdc++: Compare match_results for failed regex_match | expand |
diff --git a/libstdc++-v3/testsuite/util/testsuite_regex.h b/libstdc++-v3/testsuite/util/testsuite_regex.h index 6af3d8d836f..f2bb068024d 100644 --- a/libstdc++-v3/testsuite/util/testsuite_regex.h +++ b/libstdc++-v3/testsuite/util/testsuite_regex.h @@ -150,8 +150,7 @@ namespace __gnu_test auto __res2 = __regex_algo_impl<_Bi_iter, _Alloc, _Ch_type, _Rx_traits, _RegexExecutorPolicy::_S_alternate, true> (__s, __e, __mm, __re, __flags); - // __m is unspecified if return value is false. - if (__res1 == __res2 && (!__res1 || __m == __mm)) + if (__res1 == __res2 && __m == __mm) return __res1; throw std::exception(); }