Commit cf8a1d5
authored
Fix llvmflang-trunk build by using gcc 9.4.0 instead of 9.2.0 (#56)
The flang build has been failing for a long time with errors about
constant expressions:
```
/root/llvm-project/flang/include/flang/Common/enum-class.h: In static member function 'static std::string_view Fortran::parser::DefinedOperator::EnumToString(Fortran::parser::DefinedOperator::IntrinsicOperator)':
/root/llvm-project/flang/include/flang/Parser/parse-tree.h:600:3: in 'constexpr' expansion of 'Fortran::common::EnumNames<17>(((const char*)(& vaArgs)))'
/root/llvm-project/flang/include/flang/Common/enum-class.h:51:16: error: '(((const char*)(& vaArgs)) == 0)' is not a constant expression
51 | } else if (!start) {
| ^~~~~~
```
There is a source level workaround for this (pass `__VA_ARGS__` directly
to `EnumNames`) but the resulting build fails some basic tests, so I don't
think it would be a good idea to use it.
My local system has a gcc 9.4.0 which compiles and tests all pass.
I was able to reproduce the 9.2.0 failure locally, but not on Compiler
Explorer. I am missing some aspect of how this macro is used I expect.
This change relates to compiler-explorer/compiler-explorer#4334.1 parent 9f78585 commit cf8a1d5
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
| |||
0 commit comments