public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ppalka at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug debug/96997] [10/11 Regression] step over in gdb always stops in basic_string(const _CharT* __s, const _Alloc& __a = _Alloc())
Date: Tue, 16 Feb 2021 18:11:12 +0000	[thread overview]
Message-ID: <bug-96997-4-XTlJD3Qoqx@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-96997-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #10 from Patrick Palka <ppalka at gcc dot gnu.org> ---
It looks like the problematic hunk from r10-7718 is

* tree.c (build_aggr_init_expr): Set the location of the AGGR_INIT_EXPR to that
of its initializer.

diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index
1d311b0fe61dc149772610e356fd81559ecdb438..8e4934c00093ec5f5627b52049394cbbca17d81f
100644 (file)
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -669,6 +669,9 @@ build_aggr_init_expr (tree type, tree init)
   else
     rval = init;

+  if (location_t loc = EXPR_LOCATION (init))
+    SET_EXPR_LOCATION (rval, loc);
+
   return rval;
 }

At the time I figured this change ought to be harmless since build_target_expr
does the same thing, and unfortunately didn't consider that it might impact
debug information generation.

Shall we just revert this hunk?  IIRC, its only purpose in this patch was to
improve the location of the "call to non-'constexpr'" diagnostic from
potential_constant_expression_1 for constexpr-nsdmi7b.C.  The only fallout of
reverting this hunk would be:

diff --git a/gcc/testsuite/g++.dg/cpp1y/constexpr-nsdmi7b.C
b/gcc/testsuite/g++.dg/cpp1y/constexpr-nsdmi7b.C                                
index 86d8ab4e759..ec10ddd2be8 100644                                           
--- a/gcc/testsuite/g++.dg/cpp1y/constexpr-nsdmi7b.C                            
+++ b/gcc/testsuite/g++.dg/cpp1y/constexpr-nsdmi7b.C                            
@@ -20,8 +20,8 @@ bar()                                                         
 {                                                                              
   A a = foo();                                                                 
   a.p->n = 5;                                                                  
-  return a; // { dg-error "non-.constexpr." }                                  
-}                                                                              
+  return a;                                                                    
+} // { dg-error "non-.constexpr." }                                            

 constexpr int                                                                  
 baz()

  parent reply	other threads:[~2021-02-16 18:11 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-09 12:29 [Bug debug/96997] New: " alexis.jeandet at member dot fsf.org
2020-09-09 15:47 ` [Bug debug/96997] " redi at gcc dot gnu.org
2020-09-10  7:29 ` [Bug debug/96997] [10/11 Regression] " rguenth at gcc dot gnu.org
2020-09-10  8:16 ` vries at gcc dot gnu.org
2020-09-10  8:19 ` vries at gcc dot gnu.org
2020-09-10  8:21 ` vries at gcc dot gnu.org
2020-09-10  9:29 ` rguenth at gcc dot gnu.org
2020-09-10 10:22 ` redi at gcc dot gnu.org
2021-02-16 17:01 ` jakub at gcc dot gnu.org
2021-02-16 17:10 ` jakub at gcc dot gnu.org
2021-02-16 17:29 ` jakub at gcc dot gnu.org
2021-02-16 18:11 ` ppalka at gcc dot gnu.org [this message]
2021-02-16 18:16 ` jakub at gcc dot gnu.org
2021-02-16 18:18 ` ppalka at gcc dot gnu.org
2021-02-17  1:49 ` cvs-commit at gcc dot gnu.org
2021-02-17 15:01 ` cvs-commit at gcc dot gnu.org
2021-02-23  3:12 ` ppalka at gcc dot gnu.org
2023-12-13 20:06 ` 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-96997-4-XTlJD3Qoqx@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).