On 15 Nov 2021, at 19:14, Mark Millard via arm <a...@freebsd.org> wrote: > > There error was: > > error: non-constant-expression cannot be narrowed from type 'long long' to > 'std::size_t' (aka 'unsi > gned int') in initializer list [-Wc++11-narrowing] > std::size_t resultBytes{size * elementBytes}; > ^~~~~~~~~~~~~~~~~~~ > /wrkdirs/usr/ports/devel/llvm13/work/llvm-project-13.0.0.src/flang/runtime/misc-intrinsic.cpp:50:27: > note: insert an explicit cast to silence this issue > std::size_t resultBytes{size * elementBytes}; > ^~~~~~~~~~~~~~~~~~~ > static_cast<size_t>( )
The flang subproject does quite a lot of mixing of size_t and uint64_t, assuming in various places that they are the same. You will also encounter similar errors when attempting to build it for e.g. i386, or other 32 bit architectures. I think it is quite a lot of work to get all of these right, and it should really be discussed upstream. So for now, I would advise to only turn on the flang option for amd64 by default. -Dimitry
signature.asc
Description: Message signed with OpenPGP