public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.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	[thread overview]
Message-ID: <bug-107722-4-XwHjRUSh7e@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-107722-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107722

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-11-16

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
static void
test_diagnostic_get_location_text ()
{
  const char *old_progname = progname;
  progname = "PROGNAME";
  assert_location_text ("PROGNAME:", NULL, 0, 0, true);
  assert_location_text ("<built-in>:", "<built-in>", 42, 10, true);


Hmmm. This is where 42 and 10 are coming from.
Oh the problem is the use directly "<built-in>" 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 *context,
   const char *file = s.file ? s.file : progname;
   int line = 0;
   int col = -1;
-  if (strcmp (file, N_("<built-in>")))
+  if (strcmp (file, special_fname_builtin ()))
     {
       line = s.line;
       if (context->show_column)
@@ -2593,7 +2593,7 @@ test_diagnostic_get_location_text ()
   const char *old_progname = progname;
   progname = "PROGNAME";
   assert_location_text ("PROGNAME:", NULL, 0, 0, true);
-  assert_location_text ("<built-in>:", "<built-in>", 42, 10, true);
+  assert_location_text ("<built-in>:", special_fname_builtin(), 42, 10, true);
   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 ....

  parent reply	other threads:[~2022-11-16 19:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-16 19:36 [Bug bootstrap/107722] New: Boostrap " anlauf at gcc dot gnu.org
2022-11-16 19:37 ` [Bug bootstrap/107722] Bootstrap " pinskia at gcc dot gnu.org
2022-11-16 19:45 ` pinskia at gcc dot gnu.org [this message]
2022-11-16 20:09 ` [Bug bootstrap/107722] [13 Regression] " anlauf at gcc dot gnu.org
2022-11-22 11:40 ` jakub at gcc dot gnu.org
2022-11-22 18:55 ` anlauf at gcc dot gnu.org
2022-11-23 13:40 ` lhyatt at gcc dot gnu.org
2022-11-23 13:44 ` cvs-commit at gcc dot gnu.org
2022-11-23 13:49 ` jakub at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-107722-4-XwHjRUSh7e@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).