From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5AD753858418; Tue, 14 Dec 2021 11:41:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5AD753858418 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/103687] [12 regression] several time/date failures after r12-5898 Date: Tue, 14 Dec 2021 11:41:26 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Dec 2021 11:41:26 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103687 --- Comment #5 from Jakub Jelinek --- On gcc110 (which is BE), I certainly can't reproduce the 3.cc failures you = see. All I see is (both -m32 and -m64): +FAIL: 22_locale/time_get/get_time/char/2.cc execution test +FAIL: 22_locale/time_get/get_time/char/wrapped_env.cc execution test +FAIL: 22_locale/time_get/get_time/char/wrapped_locale.cc execution test +FAIL: 22_locale/time_get/get_time/wchar_t/2.cc execution test +FAIL: 22_locale/time_get/get_time/wchar_t/wrapped_env.cc execution test +FAIL: 22_locale/time_get/get_time/wchar_t/wrapped_locale.cc execution test and the reason for that is simple, old glibc. On gcc110 with glibc 2.17 one gets: LC_ALL=3Den_HK locale -k LC_TIME | grep _fmt | grep -v era d_t_fmt=3D"%A, %B %d, %Y %p%I:%M:%S %Z" d_fmt=3D"%A, %B %d, %Y" t_fmt=3D"%I:%M:%S %Z" t_fmt_ampm=3D"%p%I:%M:%S %Z" date_fmt=3D"%a %b %e %H:%M:%S %Z %Y" While on glibc 2.32 I get: LC_ALL=3Den_HK locale -k LC_TIME | grep _fmt | grep -v era d_t_fmt=3D"%A, %B %d, %Y %p%I:%M:%S" d_fmt=3D"%A, %B %d, %Y" t_fmt=3D"%I:%M:%S %p %Z" t_fmt_ampm=3D"%I:%M:%S %p %Z" date_fmt=3D"%A, %B %d, %Y %p%I:%M:%S %Z" r12-5898 changed the testcase to match the recent glibc locale data: https://gcc.gnu.org/git/?p=3Dgcc.git;a=3Dblobdiff;f=3Dlibstdc%2B%2B-v3/test= suite/22_locale/time_get/get_time/char/2.cc;h=3Da847748dc2716c7073bf7e6a2c5= be8d1fefbf21c;hp=3D79f921d1cf6795e242f590cb8062a738c742884c;hb=3Dc82e492616= e343b6d6db218d2b498267bac899de;hpb=3D57b291c27ee7b2b2e6c04c37ec1b8f5bf87b99= c4 previously it was failing on recent glibc and not on the old one. One option to fix this would be custom locales where we don't have to chase what exactly glibc of the day locales contain. Another would be to use the non-standard _M_time_formats method on the __timepunct facet of the locale, check what that string contains and based = on that decide what exactly to do in the test. Another one would be to use the C APIs to query it (setlocale and nl_langin= fo).=