https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110531
--- Comment #11 from Kewen Lin <linkw at gcc dot gnu.org> --- (In reply to Hao Liu from comment #10) > > foo is just an example for not getting inlined, the point here is extra > > cost paid. > > My point is that the case is different from the original case in > tree-vect-loop.cc. For example, change the case as following: > > __attribute__((noipa)) int foo(int *a) { *a == 1 ? return 1 : return 0;} > > That's similar to the original problem (the value of "a" is undefiend). > > I don't mean that "a" must be initialized in test(). We can also initalize > "a" in foo, but should not use "a" before initialization. E.g. > > __attribute__((noipa)) int foo(int *a) { > *a == 1; > ... > if (*a) > } > > The above case has no problem. Yeah, I got your point here, but my case above is mainly to show that we need to pay a bit more cost to initialize variable (there foo is just a random one which isn't inlined). Anyway, thanks for further clarifying.