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 debug/104337] [9/10/11/12 Regression] ICE when compiling with optimize attribute and always_inline at -m32 -g3 -O0
Date: Thu, 03 Feb 2022 15:02:41 +0000	[thread overview]
Message-ID: <bug-104337-4-YzenpKUZW6@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-104337-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:1d5c7584fd6e72bfdbede86cef5ff04ae35f9744

commit r12-7026-g1d5c7584fd6e72bfdbede86cef5ff04ae35f9744
Author: Richard Biener <rguenther@suse.de>
Date:   Thu Feb 3 11:20:59 2022 +0100

    debug/104337 - avoid messing with the abstract origin chain in NRV

    The following avoids NRV from massaging DECL_ABSTRACT_ORIGIN after
    variable creation since NRV runs _after_ the function was inlined and thus
    affects the inlined variables copy indirectly.  We may adjust the abstract
    origin of a variable only at the point we create it, not further along the
    path since otherwise the (new) invariant that the abstract origin is always
    the ultimate origin cannot be maintained.

    The intent of what NRV does is OK I guess and it may improve the debug
    experience.  But I also notice we do

      SET_DECL_VALUE_EXPR (found, result);
      DECL_HAS_VALUE_EXPR_P (found) = 1;

    the code is there since the merge from tree-ssa which added tree-nrv.c.

    Jakub added the DECL_VALUE_EXPR in
g:938650d8fddb878f623e315f0b7fd94b217efa96
    and Jason added the abstract origin setting conditional in g:7716876bbd3a

    The follwoing takes the radical approach and remove the attempt
    to "optimize" the debug info.

    The gdb testsuites show no regressions.

    2022-02-03  Richard Biener  <rguenther@suse.de>

            PR debug/104337
            * tree-nrv.cc (pass_nrv::execute): Remove tieing result and found
            together via DECL_ABSTRACT_ORIGIN.

            * gcc.dg/debug/pr104337.c: New testcase.

  parent reply	other threads:[~2022-02-03 15:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-01 22:52 [Bug debug/104337] New: ICE when compiling with optimize attribute " tlwang at uwaterloo dot ca
2022-02-02  5:11 ` [Bug debug/104337] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org
2022-02-02  5:16 ` [Bug debug/104337] [9/10/11/12 Regression] ICE when compiling with optimize attribute and always_inline " pinskia at gcc dot gnu.org
2022-02-02 10:20 ` rguenth at gcc dot gnu.org
2022-02-02 10:20 ` rguenth at gcc dot gnu.org
2022-02-03 15:02 ` cvs-commit at gcc dot gnu.org [this message]
2022-03-16  8:22 ` [Bug debug/104337] [9/10/11 " cvs-commit at gcc dot gnu.org
2022-04-21 12:51 ` [Bug debug/104337] [9/10 " cvs-commit at gcc dot gnu.org
2022-05-27  9:54 ` [Bug debug/104337] [9 " rguenth 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-104337-4-YzenpKUZW6@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).