public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug preprocessor/105608] [11/12/13/14 Regression] ICE: in linemap_add with a really long defined macro on the command line r11-338-g2a0225e47868fbfc
Date: Thu, 01 Feb 2024 14:17:32 +0000	[thread overview]
Message-ID: <bug-105608-4-pvTXqltGi1@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-105608-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #15 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Lewis Hyatt <lhyatt@gcc.gnu.org>:

https://gcc.gnu.org/g:019dc63819befb2b82077fb2d76b5dd670946f36

commit r14-8698-g019dc63819befb2b82077fb2d76b5dd670946f36
Author: Lewis Hyatt <lhyatt@gmail.com>
Date:   Wed Jan 31 15:50:11 2024 -0500

    libcpp: Stabilize the location for macros restored after PCH load
[PR105608]

    libcpp currently lacks the infrastructure to assign correct locations to
    macros that were defined prior to loading a PCH and then restored
    afterwards. While I plan to address that fully for GCC 15, this patch
    improves things by using at least a valid location, even if it's not the
    best one. Without this change, libcpp uses pfile->directive_line as the
    location for the restored macros, but this location_t applies to the old
    line map, not the one that was just restored from the PCH, so the resulting
    location is unpredictable and depends on what was stored in the line maps
    before. With this change, all restored macros get assigned locations at the
    line of the #include that triggered the PCH restore. A future patch will
    store the actual file name and line number of each definition and then
    synthesize locations in the new line map pointing to the right place.

    gcc/c-family/ChangeLog:

            PR preprocessor/105608
            * c-pch.cc (c_common_read_pch): Adjust line map so that libcpp
            assigns a location to restored macros which is the same location
            that triggered the PCH include.

    libcpp/ChangeLog:

            PR preprocessor/105608
            * pch.cc (cpp_read_state): Set a valid location for restored
            macros.

  parent reply	other threads:[~2024-02-01 14:17 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-15  8:08 [Bug preprocessor/105608] New: [13 Regression] ICE: in linemap_add, at libcpp/line-map.cc:502 on ovito-3.7.1 slyfox at gcc dot gnu.org
2022-05-16  7:12 ` [Bug preprocessor/105608] [11/12/13 Regression] ICE: in linemap_add, at libcpp/line-map.cc:502 on ovito-3.7.1 since r11-338-g2a0225e47868fbfc marxin at gcc dot gnu.org
2022-05-16  7:30 ` pinskia at gcc dot gnu.org
2022-05-16  8:12 ` rguenth at gcc dot gnu.org
2023-05-02 20:56 ` [Bug preprocessor/105608] [11/12/13/14 Regression] ICE: in linemap_add with a really long defined macro on the command line r11-338-g2a0225e47868fbfc lhyatt at gcc dot gnu.org
2023-05-29 10:07 ` jakub at gcc dot gnu.org
2023-12-15 21:30 ` lhyatt at gcc dot gnu.org
2024-01-27  4:30 ` cvs-commit at gcc dot gnu.org
2024-01-27 12:56 ` cvs-commit at gcc dot gnu.org
2024-01-27 17:08 ` cvs-commit at gcc dot gnu.org
2024-01-27 21:51 ` cvs-commit at gcc dot gnu.org
2024-01-27 21:53 ` lhyatt at gcc dot gnu.org
2024-01-30 13:57 ` ro at gcc dot gnu.org
2024-01-30 14:38 ` lhyatt at gcc dot gnu.org
2024-01-30 14:54 ` ro at CeBiTec dot Uni-Bielefeld.DE
2024-01-30 22:05 ` lhyatt at gcc dot gnu.org
2024-01-31 14:49 ` lhyatt at gcc dot gnu.org
2024-02-01 14:17 ` cvs-commit at gcc dot gnu.org [this message]
2024-02-22 14:45 ` cvs-commit 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-105608-4-pvTXqltGi1@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).