public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-6274] Set DECL_ARTIFICIAL on gfortran internal variables.
@ 2020-12-20 15:30 Thomas König
  0 siblings, 0 replies; only message in thread
From: Thomas König @ 2020-12-20 15:30 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:8d76c007afe4c70f51fd56b0e5b89522de5de61f

commit r11-6274-g8d76c007afe4c70f51fd56b0e5b89522de5de61f
Author: Thomas Koenig <tkoenig@gcc.gnu.org>
Date:   Sun Dec 20 16:27:01 2020 +0100

    Set DECL_ARTIFICIAL on gfortran internal variables.
    
    It seems we sometimes use DECL_ARTIFICIAL as choosing between
    different code paths.  In order not to make -fdebug-aux-vars
    do different things, set DECL_ARTIFICIAL on the variables to
    avoid these different code paths (and the corresponding
    regressions).
    
    gcc/fortran/ChangeLog:
    
            * trans.c (create_var_debug_raw): Set DECL_ARTIFICIAL
            on variables.

Diff:
---
 gcc/fortran/trans.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c
index 7ee2bd159fc..09104f35ee7 100644
--- a/gcc/fortran/trans.c
+++ b/gcc/fortran/trans.c
@@ -97,6 +97,9 @@ create_var_debug_raw (tree type, const char *prefix)
 
   t = build_decl (input_location, VAR_DECL, get_identifier (name_buf), type);
 
+  /* Not setting this causes some regressions.  */
+  DECL_ARTIFICIAL (t) = 1;
+
   /* We want debug info for it.  */
   DECL_IGNORED_P (t) = 0;
   /* It should not be nameless.  */


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-20 15:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-20 15:30 [gcc r11-6274] Set DECL_ARTIFICIAL on gfortran internal variables Thomas König

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).