Skip to content
Commit a8ef13ea authored by Jean Perier's avatar Jean Perier
Browse files

[flang] Fix template step limit issue with clang

While working on PR 959, I instanciated a `common::TupleToVariant`
with ~50+ types inside the tuple. Clang would then crash after
1hr compilation with message:
"constexpr evaluation hit maximum step limit; possible infinite loop"
After investigating, it turned out clang handles very badly the way
`common::AreTypesDistinctHelper` was implemented.
Its "number of steps" was exponential with the number of types.
This fix makes this number quadratic which solves the issue.

Original-commit: flang-compiler/f18@4542cb57082eaf578799c76482d4b706ae5da077
Reviewed-on: https://github.com/flang-compiler/f18/pull/968
parent b6363fac
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment