Re: Function return value can't be infered when it's not inlined

2023-10-04 Thread Richard Biener via Gcc
> Am 04.10.2023 um 16:16 schrieb Hanke Zhang : > > Richard Biener 于2023年10月4日周三 16:43写道: >> >>> On Wed, Oct 4, 2023 at 10:37 AM Richard Biener >>> wrote: >>> >>> On Tue, Oct 3, 2023 at 6:30 PM Hanke Zhang via Gcc wrote: Hi, I'm a little confused about the behavior of gcc when t

Re: Function return value can't be infered when it's not inlined

2023-10-04 Thread Hanke Zhang via Gcc
Richard Biener 于2023年10月4日周三 16:43写道: > > On Wed, Oct 4, 2023 at 10:37 AM Richard Biener > wrote: > > > > On Tue, Oct 3, 2023 at 6:30 PM Hanke Zhang via Gcc wrote: > > > > > > Hi, I'm a little confused about the behavior of gcc when the function > > > is not inlined. > > > > > > Here is an examp

Re: Function return value can't be infered when it's not inlined

2023-10-04 Thread Richard Biener via Gcc
On Wed, Oct 4, 2023 at 10:37 AM Richard Biener wrote: > > On Tue, Oct 3, 2023 at 6:30 PM Hanke Zhang via Gcc wrote: > > > > Hi, I'm a little confused about the behavior of gcc when the function > > is not inlined. > > > > Here is an example code: > > > > int __attribute__((noinline)) foo() { > >

Re: Function return value can't be infered when it's not inlined

2023-10-04 Thread Richard Biener via Gcc
On Tue, Oct 3, 2023 at 6:30 PM Hanke Zhang via Gcc wrote: > > Hi, I'm a little confused about the behavior of gcc when the function > is not inlined. > > Here is an example code: > > int __attribute__((noinline)) foo() { > return 1; > } > > int main() { > if (foo()) { > printf("foo