awarzynski requested changes to this revision.
awarzynski added a comment.
This revision now requires changes to proceed.
Thank you for updating this!
I've left a couple of small suggestions inline. Once those are addressed I
believe that this is ready to land. @tskeith, any thoughts ?
================
Comment at: flang/lib/Frontend/CompilerInvocation.cpp:254
+ if (args.hasArg(clang::driver::options::OPT_fdefault_real_8))
+ res.defaultKinds().set_defaultRealKind(8);
+ if (args.hasArg(clang::driver::options::OPT_fdefault_integer_8)) {
----------------
From `gfortran` [[
https://gcc.gnu.org/onlinedocs/gfortran/Fortran-Dialect-Options.html |
documentation ]]:
```
This option promotes the default width of DOUBLE PRECISION and double real
constants like 1.d0 to 16 bytes if possible.
```
So I believe that you are missing:
```
res.defaultKinds().set_doublePrecisionKind(16);
```
================
Comment at: flang/lib/Frontend/CompilerInvocation.cpp:269-271
+ // For -fdefault-double-8 + -fdefault-real-8, only the size of
+ // DOUBLE PRECISION type changes, the size of default real type stays
+ // the same
----------------
I think that it's more like:
```
// -fdefault-real-8 alone promotes the width for DOUBLE PRECISION to 16 bytes.
-fdefault-double-8 overwrites that and sets the width back to 8 bytes.
```
Since this patch adds `gfortran` style semantics, it would be worth adding a
link to the docs somewhere at the top.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96344/new/
https://reviews.llvm.org/D96344
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits