https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103687
--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #7) > Yet another option would be a new dg- directive (ideally something usable in > effective target expressions) that would invoke (ideally remote) > LC_ALL=$second_arg locale -k $first_arg > and try to match it against the third argument (regex). So one could verify > the assumptions the test is making, > [dg-locale-test LC_TIME "en_HK" "^t_fmt=\"%I:%M:%S %p %Z\""] > or so. That sounds great, although if the test changes from PASS to UNSUPPORTED we're unlikely to notice, and then we just stop testing the code. I think custom locales are the ideal solution, so we can control exactly what they contain, but I haven't found time to do it.