[PATCH] D120051: [flang][driver] Make `flang-new` always generate run-time type info

Andrzej Warzynski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 22 07:29:27 PST 2022


awarzynski added inline comments.


================
Comment at: flang/lib/Frontend/FrontendAction.cpp:203
+    return false;
+  }
+
----------------
jeanPerier wrote:
> Mmh. I gave some bad advice... It looks like the builds are failing because this error is reported when compiling the builtin modules before `__fortran_type_info.f90` was compiled to create the module (this includes the bootstrapping case of  `__fortran_type_info.f90`). I am not sure how solide it would be to determine if this is a builtin module compilation and that this message should not be emitted.
I don't have a good solution. We could either:
# disable this diagnostic when `__fortran_builtins` is being compiled (that's the only dependency from [[ https://github.com/llvm/llvm-project/blob/main/flang/module/__fortran_type_info.f90#L16 | __fortran_type_info.f90 ]] that needs to be processed before `__fortran_type_info.f90`), or
# implement a dedicated compiler flag to disable this particular diagnostic and use it in [[ https://github.com/llvm/llvm-project/blob/main/flang/tools/f18/CMakeLists.txt#L39 | CMake ]] for when `__fortran_builtins` is being compiled. 

I'm not sure how to achieve 1. in a reliable way (i.e. how to identify that it's indeed the builtin module is being processed?). As for 2., I really dislike the idea of adding a dedicated compiler flag to work around a very specific corner case. Any other suggestions?

I think that moving this bit back to `DebugDumpSymbolsAction::ExecuteAction` and `DebugDumpAllAction::ExecuteAction` would be a good compromise for now. We know that these run-time tables should be generated, but we cannot reliably check whether `schemata` was indeed set. Not yet.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120051/new/

https://reviews.llvm.org/D120051



More information about the llvm-commits mailing list