On Sat, Oct 7, 2023 at 3:08 PM Hanke Zhang via Gcc wrote:
>
> 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() {
> f
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