https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102359
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Qing Zhao <qinz...@gcc.gnu.org>: https://gcc.gnu.org/g:433516e1c6b1f8eeceeceb83cec5ea02a14065dc commit r12-4200-g433516e1c6b1f8eeceeceb83cec5ea02a14065dc Author: qing zhao <qing.z...@oracle.com> Date: Tue Oct 5 16:14:00 2021 -0700 Not add initialization for variables been initialized by FEs [PR102359] C++ FE creates proxy variables, which have associated DECL_VALUE_EXPR and have been initialized by FE. For such auto variable, we should not add initialization when -ftrivial-auto-var-init presents. PR middle-end/102359 gcc/ChangeLog: 2021-10-05 qing zhao <qing.z...@oracle.com> * gimplify.c (gimplify_decl_expr): Not add initialization for an auto variable when it has been initialized by frontend. gcc/testsuite/ChangeLog: 2021-10-05 qing zhao <qing.z...@oracle.com> * g++.dg/pr102359_1.C: New test. * g++.dg/pr102359_2.C: New test.