https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114454
--- Comment #3 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> --- > --- Comment #1 from Ian Lance Taylor <ian at airs dot com> --- > I'm not sure what is going on here. The test as such does not require a UTF-8 > LANG. That is, I can run the compiler and the test with LANG=C and everything > passes. In fact, that is exactly how the GCC testsuite runs the test: the GCC > testsuite sets LANG=C before all tests. > > As best I can tell the problem must be arising somehow in the DejaGNU code. > The filenames in the test use UTF-8 non-ASCII characters. But I haven't been > able to figure out where the problem is. I've done a bit more digging now, running the test under runtest both with LANG=en_US.UTF-8 and LANG=C. * Comparing go.log shows -PASS: go.test/test/fixedbugs/issue27836.dir/�<84>foo.go -O -I. (test for excess errors) +go1: fatal error: cannot open /vol/gcc/src/hg/master/local/gcc/testsuite/go.test/test/fixedbugs/issue27836.dir/�<83>�<84>foo.go: No such file or directory i.e. a leading "�<83>" is added to the filename. * Running both under truss, I see that gccgo is invoked differently: LANG=UTF-8: 14285: execve("/var/gcc/regression/master/11.4-gcc/build/gcc/testsuite/go-issue27836/../../gccgo", 0x00E00790, 0x009A5F10) argc = 12 14285: argv: 14285: /var/gcc/regression/master/11.4-gcc/build/gcc/testsuite/go-issue27836/../../gccgo 14285: -B/var/gcc/regression/master/11.4-gcc/build/gcc/testsuite/go-issue27836/../../ 14285: -fdiagnostics-plain-output 14285: -I/var/gcc/regression/master/11.4-gcc/build/i386-pc-solaris2.11/./libgo 14285: -O -I. -w -pedantic-errors -c -o Ã<84>foo.o 14285: /vol/gcc/src/hg/master/local/gcc/testsuite/go.test/test/fixedbugs/issue27836.dir/Ã<84>foo.go LANG=C: 14441: execve("/var/gcc/regression/master/11.4-gcc/build/gcc/testsuite/go-issue27836/../../gccgo", 0x00DFFA40, 0x009A11A0) argc = 12 14441: argv: 14441: /var/gcc/regression/master/11.4-gcc/build/gcc/testsuite/go-issue27836/../../gccgo 14441: -B/var/gcc/regression/master/11.4-gcc/build/gcc/testsuite/go-issue27836/../../ 14441: -fdiagnostics-plain-output 14441: -I/var/gcc/regression/master/11.4-gcc/build/i386-pc-solaris2.11/./libgo 14441: -O -I. -w -pedantic-errors -c -o Ã<83>Â<84>foo.o 14441: /vol/gcc/src/hg/master/local/gcc/testsuite/go.test/test/fixedbugs/issue27836.dir/Ã<83>Â<84>foo.go So the caller of gccgo (runtest/expect) calls it differently. runtest is the latest version: DejaGnu version 1.6.3 Expect version 5.45.4 Tcl version 8.6 but expect is ancient (the latest available from 2018). My inclination to debug runtest or even expect is limited, TBH.