<p style="white-space: pre-wrap; word-wrap: break-word;">If -O0 and -Og do not face that issue, an expected False Positive sounds likely. I would start a discussion with a GCC guy whether it is worth further investigation. Unfortunately, I am not aware of anyone in the Asterisk team or within the regular Asterisk contributors who is into GCC. Recently, there was an issue for sure with one of the optimizations of -O3. Instead of investigating with the GCC community, a may-not-related bug found somehow was used as justification to disable that optimization.</p><p style="white-space: pre-wrap; word-wrap: break-word;">At the end, it is ‘our’ job to create a minimal example and then hook-up with the GCC community. Go figure! In my -Og cases, I really consider that because those are really crazy ones (although they have terrible easy workarounds like yours here). George, why do you block this here?</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/14501">View Change</a></p><ul style="list-style: none; padding: 0;"></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/14501">change 14501</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/14501"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-Change-Id: Ic7a70120188c9aa525a6d70289385bfce878438a </div>
<div style="display:none"> Gerrit-Change-Number: 14501 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Walter Doekes <walter+asterisk@wjd.nu> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-CC: Alexander Traud <pabstraud@compuserve.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 28 Oct 2020 13:39:16 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>