On Thu, Oct 31, 2024 at 10:02 AM Xi Ruoyao <xry...@xry111.site> wrote: > > On Tue, 2024-10-29 at 19:19 -0400, David Malcolm wrote: > > +static void > > +test_output_arg_parsing () > > +{ > > + auto_fix_quotes fix_quotes; > > + auto_fix_progname fix_progname; > > + > > + /* Minimal correct example. */ > > + { > > + parser_test pt; > > + auto result = pt.parse ("foo"); > > + ASSERT_EQ (result->m_format, "foo"); > > + ASSERT_EQ (result->m_kvs.size (), 0); > > + ASSERT_FALSE (pt.execution_failed_p ()); > > + } > > + > > + /* Stray trailing colon with no key/value pairs. */ > > + { > > + parser_test pt; > > + auto result = pt.parse ("foo:"); > > + ASSERT_EQ (result, nullptr); > > + ASSERT_TRUE (pt.execution_failed_p ()); > > + ASSERT_STREQ (pt.get_diagnostic_text (), > > + "PROGNAME: error: `-fOPTION=foo:':" > > + " expected KEY=VALUE-style parameter for format `foo'" > > + " after `:';" > > + " got `'\n"); > > + } > > Hi David, > > Unfortunately this test fails with LANG=zh_CN.UTF-8, breaking bootstrap: > > ../../gcc-upstream/gcc/opts-diagnostic.cc:599: test_output_arg_parsing: FAIL: > ASSERT_STREQ (pt.get_diagnostic_text (), "PROGNAME: error: `-fOPTION=foo:':" > " expected KEY=VALUE-style parameter for format `foo'" " after `:';" " got > `'\n") > val1="PROGNAME: 错误:`-fOPTION=foo:': expected KEY=VALUE-style parameter for > format `foo' after `:'; got `' > " > val2="PROGNAME: error: `-fOPTION=foo:': expected KEY=VALUE-style parameter > for format `foo' after `:'; got `' > " > > ("错误" just means "error" in Chinese.) > > I'm not sure what the best way is to fix the issue.
This is recorded as https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117361 already. I think one idea is to set LANG=C before doing the self-check. But I will allow David and other think of better ways of fixing it. Thanks, Andrew > > -- > Xi Ruoyao <xry...@xry111.site> > School of Aerospace Science and Technology, Xidian University