[PATCH] D95460: [flang][driver] Add forced form flags and -ffixed-line-length

2021-03-29 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. Hi @protze.joachim , Interestingly, GCC does not _error_ when using `gfortran` flags: $ gcc -ffree-form file.c cc1: warning: command line option ‘-ffree-form’ is valid for Fortran but not for C I've implemented similar behavior for Clang in https://reviews.llvm

[PATCH] D95460: [flang][driver] Add forced form flags and -ffixed-line-length

2021-03-19 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. Thank you for you reply Joachim, I see 3 options here: **OPTION 1:** make Clang accept these options This would be as simple as removing the `FlangOnlyOption` from the corresponding TableGen definitions in Options.td. However, since we added help texts to their defi

[PATCH] D95460: [flang][driver] Add forced form flags and -ffixed-line-length

2021-03-18 Thread Joachim Protze via Phabricator via cfe-commits
protze.joachim added a comment. Hi Andrzej, thanks for the detailed insights. I think I really misunderstood, what the -W flags can do here. I also was not up-to-date regarding the state of the flang implementation. I just found, that compiling Spec OMP 2012 with clang-12 worked fine with my

[PATCH] D95460: [flang][driver] Add forced form flags and -ffixed-line-length

2021-03-18 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. Hi @protze.joachim, Thank you for your feedback. I'm sorry that this is causing issues in your set-up. In D95460#2632844 , @protze.joachim wrote: > Before this patch, clang would happily ignore a `-ffree-form` flag. It's a

[PATCH] D95460: [flang][driver] Add forced form flags and -ffixed-line-length

2021-03-17 Thread Joachim Protze via Phabricator via cfe-commits
protze.joachim added a comment. Before this patch, clang would happily ignore a `-ffree-form` flag. With this patch, none of `-Wno-error=unknown-argument`, `-Wno-unknown-argument` , `-Qunused-arguments` help to avoid clang from exiting with error: unknown argument: '-ffree-form' Why can't cl

[PATCH] D95460: [flang][driver] Add forced form flags and -ffixed-line-length

2021-02-04 Thread Faris via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG3a1513c142f4: [flang][driver] Add forced form flags and -ffixed-line-length (authored by FarisRehman). Repository: rG LLVM Github Monorepo CHANGE

[PATCH] D95460: [flang][driver] Add forced form flags and -ffixed-line-length

2021-02-03 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski accepted this revision. awarzynski added a comment. This revision is now accepted and ready to land. Thank you for working on this @FarisRehman ! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95460/new/ https://reviews.llvm.org/D95460 _

[PATCH] D95460: [flang][driver] Add forced form flags and -ffixed-line-length

2021-02-02 Thread Faris via Phabricator via cfe-commits
FarisRehman updated this revision to Diff 320811. FarisRehman marked an inline comment as done. FarisRehman added a comment. Address review comment This revision addresses a review comment by @tskeith Summary of changes: - Add a new option, ffixed_line_length_EQ, that defines `-ffixed-line-leng

[PATCH] D95460: [flang][driver] Add forced form flags and -ffixed-line-length

2021-01-29 Thread Tim Keith via Phabricator via cfe-commits
tskeith added inline comments. Comment at: clang/include/clang/Driver/Options.td:4133 def fconvert_EQ : Joined<["-"], "fconvert=">, Group; -def ffixed_line_length_VALUE : Joined<["-"], "ffixed-line-length-">, Group; +def ffixed_line_length_VALUE : Joined<["-"], "ffixed-line-len

[PATCH] D95460: [flang][driver] Add forced form flags and -ffixed-line-length

2021-01-29 Thread Faris via Phabricator via cfe-commits
FarisRehman updated this revision to Diff 320145. FarisRehman added a comment. Remove -fno-fixed-form and -fno-free-form Remove options `-fno-fixed-form` and `-fno-free-form` allowing for help messages to be added to `-ffixed-form` and `-ffree-form`. Repository: rG LLVM Github Monorepo CHAN

[PATCH] D95460: [flang][driver] Add forced form flags and -ffixed-line-length

2021-01-29 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. @FarisRehman, thank you for addressing my comments! I've just realised that `gfortran` doesn't actually support `-fno-fixed-form` or `-fno-free-form`: $ gfortran -ffixed-form -fno-fixed-form test.f gfortran: error: unrecognized command line option ‘-fno-fixed-form

[PATCH] D95460: [flang][driver] Add forced form flags and -ffixed-line-length

2021-01-28 Thread Faris via Phabricator via cfe-commits
FarisRehman marked an inline comment as done. FarisRehman added inline comments. Comment at: flang/lib/Frontend/CompilerInstance.cpp:151-158 + if (invoc.frontendOpts().fortranForm_ == FortranForm::Unknown) { +// Switch between fixed and free form format based on the

[PATCH] D95460: [flang][driver] Add forced form flags and -ffixed-line-length

2021-01-28 Thread Faris via Phabricator via cfe-commits
FarisRehman updated this revision to Diff 319842. FarisRehman marked 12 inline comments as done. FarisRehman added a comment. Address review comment Address the review comment by @awarzynski Summary of changes: - Shorten help text - Add method AddFortranDialectOptions to Flang.cpp - Change styl

[PATCH] D95460: [flang][driver] Add forced form flags and -ffixed-line-length

2021-01-27 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. Thank you for working on this @FarisRehman ! I've left a few inline comments, but nothing major. Really nice to see this being added and working as expected! Comment at: clang/include/clang/Driver/Options.td:4074-4076 +def ffixed_line_length_VALUE :

[PATCH] D95460: [flang][driver] Add forced form flags and -ffixed-line-length

2021-01-26 Thread Faris via Phabricator via cfe-commits
FarisRehman created this revision. Herald added a reviewer: sscalpone. Herald added a subscriber: dang. Herald added a reviewer: awarzynski. Herald added a reviewer: jansvoboda11. FarisRehman requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.