aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorThomas Koenig <tkoenig@gcc.gnu.org>2020-12-20 16:27:01 +0100
committerThomas Koenig <tkoenig@gcc.gnu.org>2020-12-20 16:36:59 +0100
commita039ddac6d248f06184f1eece05d1da513917d69 (patch)
tree325831491e6a250d8d12bcbacb84ca8ffaf7c5d8 /gcc
parent7c641985fd8b75cd741ac0c98c1924629d45cb34 (diff)
downloadgcc-a039ddac6d248f06184f1eece05d1da513917d69.zip
gcc-a039ddac6d248f06184f1eece05d1da513917d69.tar.gz
gcc-a039ddac6d248f06184f1eece05d1da513917d69.tar.bz2
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. (cherry picked from commit 8d76c007afe4c70f51fd56b0e5b89522de5de61f)
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fortran/trans.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c
index fa7fd9d..57a344a 100644
--- a/gcc/fortran/trans.c
+++ b/gcc/fortran/trans.c
@@ -128,6 +128,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. */