-
Notifications
You must be signed in to change notification settings - Fork 11.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression: clang-13 fatally fails when Fortran flags like -ffree-form are present #50681
Comments
Thank you for posting this, Joachim! Just to clarify, clang-13 and trunk only fail when using Fortran options in non-Flang mode [1] (i.e. when using Btw, this was also discussed on cfe-dev [2]. -Andrzej [1] https:/llvm/llvm-project/blob/release/13.x/clang/include/clang/Driver/Driver.h#L69 |
For reference gcc/11 behavior: $ gcc test.c -ffree-form In linker mode, gcc does not even write a warning. Only when compiling C code, you get a warning. Getting a warning would be fine. Starting to throw a fatal error is the problem. For typical use cases I'm aware of, fixing the issue in linker mode would be sufficient. |
mentioned in issue #51489 |
The deadline for requesting fixes for the release has passed. This bug is being removed from the LLVM 13.0.1 release milestone. If you have a fix or think this bug is important enough to block the release, please explain why in a comment and add the bug back to the LLVM 13.0.1 release milestone. |
Extended Description
clang-12 accepted and ignored Fortran flags like -ffree-form. clang-13 and trunk fatally fail, when Fortran flags are applied.
The use case, where I see the current behavior as an issue is linking multiple object files compiled from different languages.
Many build systems will pass CFLAGS as well as FFLAGS to the linker command in such case. To automatically link the necessary language-specific runtime libraries, I see using the compiler driver for linking as common practice:
To support such workflow, the compiler should not error out, at least when only used for linking.
This works with
CC=gcc
,CXX=g++
,FC=gfortran
, andFORTRAN_RUNTIME=gfortran
.This used to work with
CC=clang-12
,CXX=clang-12++
,FC=gfortran
, andFORTRAN_RUNTIME=gfortran
.A possible fix is available in https://reviews.llvm.org/D99353
The text was updated successfully, but these errors were encountered: