From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8C0FD382FAEE; Wed, 16 Nov 2022 19:45:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8C0FD382FAEE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668627952; bh=pXacEk6FF48/UhdcMcOlbdOoaNKZ0tw1OEbbk9owlbs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=YE862wHozOciFNB7vYWGKabcd6CEGdNLf16n2t02bVfQDxqjYQzOKPUexzKRUE+Ng cdskCkJRAt6zLhyCQdlYHYRImAMzAZRQslTxakZTHxRSdkKyHvZB1atG2bIjxmB5mj 3hdR4NUEUoj7uNRwgHcN//9LJsBX4m/Scbl5KJ70= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug bootstrap/107722] [13 Regression] Bootstrap failure for some locales starting with r13-4070 Date: Wed, 16 Nov 2022 19:45:52 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: bootstrap X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: build, ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia 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: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status everconfirmed cf_reconfirmed_on 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107722 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Last reconfirmed| |2022-11-16 --- Comment #1 from Andrew Pinski --- static void test_diagnostic_get_location_text () { const char *old_progname =3D progname; progname =3D "PROGNAME"; assert_location_text ("PROGNAME:", NULL, 0, 0, true); assert_location_text (":", "", 42, 10, true); Hmmm. This is where 42 and 10 are coming from. Oh the problem is the use directly "" here rather than special_fname_builtin . This might fix/improve that: diff --git a/gcc/diagnostic.cc b/gcc/diagnostic.cc index 22f7b0b6d6e..5764ce672ec 100644 --- a/gcc/diagnostic.cc +++ b/gcc/diagnostic.cc @@ -470,7 +470,7 @@ diagnostic_get_location_text (diagnostic_context *conte= xt, const char *file =3D s.file ? s.file : progname; int line =3D 0; int col =3D -1; - if (strcmp (file, N_(""))) + if (strcmp (file, special_fname_builtin ())) { line =3D s.line; if (context->show_column) @@ -2593,7 +2593,7 @@ test_diagnostic_get_location_text () const char *old_progname =3D progname; progname =3D "PROGNAME"; assert_location_text ("PROGNAME:", NULL, 0, 0, true); - assert_location_text (":", "", 42, 10, true); + assert_location_text (":", special_fname_builtin(), 42, 10, tr= ue); assert_location_text ("foo.c:42:10:", "foo.c", 42, 10, true); assert_location_text ("foo.c:42:9:", "foo.c", 42, 10, true, 0); assert_location_text ("foo.c:42:1010:", "foo.c", 42, 10, true, 1001); But I am not 100% sure it is correct ....=