mibintc added a comment.

In D87528#2297647 <https://reviews.llvm.org/D87528#2297647>, @sepavloff wrote:

> In D87528#2295015 <https://reviews.llvm.org/D87528#2295015>, @mibintc wrote:
>
>> I tried using the 0924 version of the patch on an internal workload SPEC 
>> "cpu2017" and found that a few files failed to compile because of an error 
>> message on static initializer, like this: struct s { float f; }; static 
>> struct s x = {0.63};   Compiled with ffp-model=strict "initializer..is not a 
>> compile-time constant"
>
> Thank you for trying this.
>
> The error happens because static variable initializer gets rounding mode 
> calculated from command-line options (`dynamic`), but this is wrong because 
> such initializers must be calculated using constant rounding mode 
> (`tonearest` in this case). Either we must force default FP mode in such 
> initializers, or we are wrong when using 
> `FPOptions::defaultWithoutTrailingStorage`. Need to analyze this problem more.

If the literal was typed, there was no diagnostic, "x = { 0.63F }".  Thanks for 
the insight re: rounding mode.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87528/new/

https://reviews.llvm.org/D87528

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to