From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1432) id 13A2E3857804; Sun, 20 Dec 2020 15:37:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 13A2E3857804 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: =?utf-8?q?Thomas_K=C3=B6nig?= To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/coarray_native] Set DECL_ARTIFICIAL on gfortran internal variables. X-Act-Checkin: gcc X-Git-Author: Thomas Koenig X-Git-Refname: refs/heads/devel/coarray_native X-Git-Oldrev: 7c641985fd8b75cd741ac0c98c1924629d45cb34 X-Git-Newrev: a039ddac6d248f06184f1eece05d1da513917d69 Message-Id: <20201220153736.13A2E3857804@sourceware.org> Date: Sun, 20 Dec 2020 15:37:36 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Dec 2020 15:37:36 -0000 https://gcc.gnu.org/g:a039ddac6d248f06184f1eece05d1da513917d69 commit a039ddac6d248f06184f1eece05d1da513917d69 Author: Thomas Koenig 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. (cherry picked from commit 8d76c007afe4c70f51fd56b0e5b89522de5de61f) Diff: --- gcc/fortran/trans.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c index fa7fd9d88aa..57a344a63c9 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. */