https://bugs.llvm.org/show_bug.cgi?id=51339

            Bug ID: 51339
           Summary: Regression: clang-13 fatally fails when Fortran flags
                    like -ffree-form are present
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: Driver
          Assignee: unassignedclangb...@nondot.org
          Reporter: pro...@itc.rwth-aachen.de
                CC: llvm-bugs@lists.llvm.org, neeil...@live.com,
                    richard-l...@metafoo.co.uk

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:

  $(FC) -c fortran-code.F90 $(FFLAGS)
  $(CXX) -c cpp-code.cpp $(CFLAGS)
  $(CC) -c c-code.c $(CFLAGS)
  $(CXX) fortran-code.o cpp-code.o c-code.o $(FFLAGS) $(CFLAGS)
-l$(FORTRAN_RUNTIME)

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`, and
`FORTRAN_RUNTIME=gfortran`.
This used to work with `CC=clang-12`, `CXX=clang-12++`, `FC=gfortran`, and
`FORTRAN_RUNTIME=gfortran`.

A possible fix is available in https://reviews.llvm.org/D99353

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to