]> git.ipfire.org Git - thirdparty/gcc.git/commit
c: Fix regression related to DECL_NONLOCAL on aarch64 [PR121933]
authorMartin Uecker <uecker@tugraz.at>
Sat, 13 Sep 2025 06:37:32 +0000 (08:37 +0200)
committerMartin Uecker <uecker@gcc.gnu.org>
Tue, 30 Sep 2025 20:53:01 +0000 (22:53 +0200)
commit4c1d8818dee177b4f6c3adbf747873a0443d02b6
tree363fe95829dd4ad98852e84ec06f8911b74cfa97
parent2f5f3eef1d5796defc37ebb46f7ad44d894c14cf
c: Fix regression related to DECL_NONLOCAL on aarch64 [PR121933]

The recent patch r16-3747-gafa74d37e81 to detect the use of non-local
context by nested functions caused regressions on aarch64, because
DECL_NONLOCAL was set on labels.  Fix this by setting it only to
the same types of decls as before.

PR target/121933

gcc/c/ChangeLog:
* c-typeck.cc (mark_decl_used): Set DECL_NONLOCAL
only for VAR_DECL, FUNC_DECL, PARM_DECL.
gcc/c/c-typeck.cc