[Bug ipa/122058] [16 regression] ICU miscompiled with -O2 -flto -fno-semantic-interposition since r16-4000-g9ee937b2f92a93
sjames at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Sep 24 22:56:42 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122058
--- Comment #6 from Sam James <sjames at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #5)
> Can you modify the inplace operator new and add a asm("":"+m"(r)); for the
> return value?
>
> I am trying to figure out if there is a lifetime change that got missed.
In i18n/numrange_fluent.cpp, I tried a bunch of:
```
FormattedNumberRange LocalizedNumberRangeFormatter::formatFormattableRange(
const Formattable& first, const Formattable& second, UErrorCode&
status) const {
+ FormattedNumberRange p;
if (U_FAILURE(status)) {
- return FormattedNumberRange(U_ILLEGAL_ARGUMENT_ERROR);
+ p = FormattedNumberRange(U_ILLEGAL_ARGUMENT_ERROR);
+ asm("":"+m"(p));
+ return p;
}
[...]
```
(and so on) which did not help. Nor did it in
LocalizedNumberRangeFormatter::getFormatter.
In i18n/numrange_impl.cpp, __attribute__((optimize("O0"))) on
NumberRangeFormatterImpl::resolveModifierPlurals does work, but asm(...) on mod
doesn't help.
More information about the Gcc-bugs
mailing list