Open fpallaresintel opened 3 months ago
@llvm/issue-subscribers-clang-frontend
Author: Ferran Pallarès (fpallaresintel)
In general, an alias has to be aliased to a definition, in the ELF sense. A C "inline definition" doesn't count as a definition in that sense. So we have to make sure that the definition is written in a way that it will actually be emitted.
Normally, the given testcase wouldn't count as an "inline definition"... but this particular testcase is hitting the carveout from https://reviews.llvm.org/D71082 . Which I think is a bug: it shouldn't count as an inline definition of a builtin because it's not an inline definition at all. That said, it's hard for me to imagine anyone hitting this in practice.
Looks like a duplicate of: https://github.com/llvm/llvm-project/issues/89474
Clang throws an error when compiling the following C code. Changing the
log1pf
function name to something else will make this compile, as well as removinginline
or__attribute__((always_inline))
from the definition. This code compiles with GCC. https://godbolt.org/z/oqPeqsva6Output:
Version (trunk):