gcc-13-20231007 is now available

2023-10-07 Thread GCC Administrator via Gcc
Snapshot gcc-13-20231007 is now available on https://gcc.gnu.org/pub/gcc/snapshots/13-20231007/ and on various mirrors, see http://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 13 git branch with the following options: git://gcc.gnu.org/git/gcc.git branch

why not optimize static local variables

2023-10-07 Thread Hanke Zhang via Gcc
Hi, I've recently been working on static local variables in C. I would like to ask about some questions about that. For example, for the following program, void foo() { static int x = 0; x++; } int main() { foo(); } After optimization with the -O3 -flto option, the entire program will loo