https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94780
--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-9 branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:1777beb6b12983b946dae4177470a319693fc0dc commit r9-8887-g1777beb6b12983b946dae4177470a319693fc0dc Author: Jakub Jelinek <ja...@redhat.com> Date: Mon Apr 27 21:14:52 2020 +0200 x86: Fix up ix86_atomic_assign_expand_fenv [PR94780] This function, because it is sometimes called even outside of function bodies, uses create_tmp_var_raw rather than create_tmp_var. But in order for that to work, when first referenced, the VAR_DECLs need to appear in a TARGET_EXPR so that during gimplification the var gets the right DECL_CONTEXT and is added to local decls. Without that, e.g. tree-nested.c ICEs on those. 2020-04-27 Jakub Jelinek <ja...@redhat.com> PR target/94780 * config/i386/i386.c (ix86_atomic_assign_expand_fenv): Use TARGET_EXPR instead of MODIFY_EXPR for first assignment to sw_var, exceptions_var, mxcsr_orig_var and mxcsr_mod_var. * gcc.dg/pr94780.c: New test. (cherry picked from commit 9b8e9006bb35641865358e2df4f6b3ae185b239a)