https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111095

--- Comment #3 from mengli ming <dale.mengli.ming at proton dot me> ---
(In reply to David Malcolm from comment #1)
> Thanks for filing this bug.
> 
> This looks similar to bug 111213.
> 
> Adding -fdump-ipa-analyzer=stderr shows that at -O1 and above, the entire
> body of the function is optimized away before the analyzer even sees it
> (presumably due to undefined behavior).
> 
> My hypothesis is that the optimizer sees the undefined behavior and
> optimizes the function away (but I haven't checked the details).
> 
> If that's the case, that's a strong argument that the analyzer should run
> earlier. I'll open a bug about that.

Thank you for the detailed explanation, David. I appreciate it.

Reply via email to