[PATCH] D87528: Enable '#pragma STDC FENV_ACCESS' in frontend cf. D69272 - Work in Progress
Serge Pavlov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 28 03:06:50 PDT 2020
sepavloff added a comment.
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.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87528/new/
https://reviews.llvm.org/D87528
More information about the cfe-commits
mailing list