public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hjl.tools at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug debug/107193] [13 regression] bootstrap error caused by r13-3172-gf30e9fd33e56a5
Date: Mon, 10 Oct 2022 22:45:54 +0000	[thread overview]
Message-ID: <bug-107193-4-eZRJhy0DcR@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-107193-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> ---
     gimple *last = last_stmt (bb);
      location_t locus = last ? gimple_location (last) : UNKNOWN_LOCATION;
      location_t curr_locus = UNKNOWN_LOCATION;
      int curr_discr = 0;

      /* Traverse the basic block, if two function calls within a basic block
        are mapped to the same line, assign a new discriminator because a call
        stmt could be a split point of a basic block.  */
      for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
        {
          gimple *stmt = gsi_stmt (gsi);
          expanded_location curr_locus_e;
          if (curr_locus == UNKNOWN_LOCATION)
            {
              curr_locus = gimple_location (stmt);
              curr_locus_e = expand_location (curr_locus);
            }
          else if (!same_line_p (curr_locus, &curr_locus_e, gimple_location
(stmt)))
            {
              curr_locus = gimple_location (stmt);
              curr_locus_e = expand_location (curr_locus);
              curr_discr = 0;
            }
          else if (curr_discr != 0)
            {
              location_t loc = gimple_location (stmt);
              location_t dloc = location_with_discriminator (loc, curr_discr);
              gimple_set_location (stmt, dloc);
            }
          /* Allocate a new discriminator for CALL stmt.  */
          if (gimple_code (stmt) == GIMPLE_CALL)
            curr_discr = next_discriminator_for_locus (curr_locus);
        }

      if (locus == UNKNOWN_LOCATION)
          Will it be changed by the loop above?
        continue;

  parent reply	other threads:[~2022-10-10 22:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-09 11:37 [Bug bootstrap/107193] New: " crazylht at gmail dot com
2022-10-09 18:52 ` [Bug bootstrap/107193] " pinskia at gcc dot gnu.org
2022-10-09 18:52 ` [Bug debug/107193] " pinskia at gcc dot gnu.org
2022-10-10  7:22 ` rguenth at gcc dot gnu.org
2022-10-10  7:28 ` crazylht at gmail dot com
2022-10-10  8:18 ` crazylht at gmail dot com
2022-10-10  8:29 ` crazylht at gmail dot com
2022-10-10 13:28 ` marxin at gcc dot gnu.org
2022-10-10 20:49 ` erozen at microsoft dot com
2022-10-10 22:42 ` hjl.tools at gmail dot com
2022-10-10 22:45 ` hjl.tools at gmail dot com [this message]
2022-10-10 23:00 ` erozen at microsoft dot com
2022-10-11  2:51 ` erozen at microsoft dot com
2022-10-11  6:35 ` cvs-commit at gcc dot gnu.org
2022-10-11  7:11 ` marxin 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-107193-4-eZRJhy0DcR@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).