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.

Reply via email to