Open
Description
Clang 16 introduces an assertion failure for MetaWare ARC targets in little-endian mode. The assertion appears to relate to setting up the target and so is trivially reproducible.
$ cat test.c
$ /opt/pkg/clang-16/bin/clang -target arc-unknown-linux-gnu -EL -c test.c
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /opt/pkg/clang-16/bin/clang -target arc-unknown-linux-gnu -EL -c test.c
1. Compilation construction
#0 0x0000556ddf2c9b68 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/pkg/clang-16/bin/clang+0x3103b68)
#1 0x0000556ddf2c7aae llvm::sys::RunSignalHandlers() (/opt/pkg/clang-16/bin/clang+0x3101aae)
#2 0x0000556ddf2ca1ed SignalHandler(int) Signals.cpp:0:0
#3 0x00007f989cb9d980 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12980)
#4 0x00007ffcfc9e3570
Segmentation fault
$
It would appear that llvm::Target::getLittleEndianArchVariant
needs to be updated to handle ARC targets.