[flang] Addresses issue flang-compiler/f18#242 by making non-inline...
[flang] Addresses issue flang-compiler/f18#242 by making non-inline definitions for the two versions of ExpressionBase::derived(). gcc-8.2 on macOS was choosing to create non-inline instances of derived() during the explicit instantiations of ExpressionBase in expression.cc and fold.cc. During linking of any executable, the linker failed when it found these duplicate definitions. While this solution works, it removes the opportunity to inline the trivial derived() functions. Another solution would be to make all of the templates related to ExpressionBase in expression.cc and fold.cc available in a single .cc file, where the explicit instantiation FOR_EACH_TYPE_AND_KIND(template class ExpressionBase) is done once. This approach would allow inlining, but require something like template implementation headers that could be included into the instantiation .cc file. Original-commit: flang-compiler/f18@074de39418299e7e53b437adfbbc381004e0886e Reviewed-on: https://github.com/flang-compiler/f18/pull/248 Tree-same-pre-rewrite: false
Loading
Please sign in to comment