/usr/bin/c++ -std=gnu++11 -o Compression.o -c -Iobj-x86_64-unknown-freebsd12.0/dist/system_wrappers -include config/gcc_hidden.h -DNDEBUG=1 -DTRIMMED=1 -DIMPL_MFBT -Imfbt -Iobj-x86_64-unknown-freebsd12.0/mfbt -Iobj-x86_64-unknown-freebsd12.0/dist/include -Iobj-x86_64-unknown-freebsd12.0/dist/include/nspr -Iobj-x86_64-unknown-freebsd12.0/dist/include/nss -fPIC -DMOZILLA_CLIENT -include obj-x86_64-unknown-freebsd12.0/mozilla-config.h -MD -MP -MF .deps/Compression.o.pp -Qunused-arguments -I/usr/local/include -Qunused-arguments -Wall -Wc++11-compat -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wloop-analysis -Wc++11-compat-pedantic -Wc++14-compat -Wc++14-compat-pedantic -Wc++1z-compat -Wcomma -Wimplicit-fallthrough -Wstring-conversion -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wformat -Wno-gnu-zero-variadic-macro-arguments -Wformat-security -Wno-unknown-warning-option -Wno-return-type-c-linkage -fno-exceptions -fno-strict-aliasing -fno-rtti -fno-exceptions -fno-math-errno -pipe -O -fno-omit-frame-pointer -Wno-error=shadow -Wno-unused-function mfbt/Compression.cpp Assertion failed: (!Old || Old->getCachedLinkage() == D->getCachedLinkage()), function getLVForDecl, file /usr/src/contrib/llvm/tools/clang/lib/AST/Decl.cpp, line 1434. c++: error: unable to execute command: Abort trap c++: error: clang frontend command failed due to signal (use -v to see invocation) FreeBSD clang version 5.0.0 (tags/RELEASE_500/final 312559) (based on LLVM 5.0.0svn) Target: x86_64-unknown-freebsd12.0 Thread model: posix InstalledDir: /usr/bin Regressed by: https://hg.mozilla.org/mozilla-central/rev/9a4077eda5d8
Created attachment 186324 [details] mfbt/Compression.cpp (preprocessed, compressed)
Created attachment 186325 [details] command line args (for clang 5.0)
Reproducible on Clang 4.0 and 3.9.
This can be reduced to just: // clang -cc1 -triple x86_64 -S bug222280.cpp namespace { extern "C" union LZ4_stream_u *LZ4_createStream(); LZ4_stream_u *LZ4_createStream(); } It's apparently a long-standing problem upstream, as there are multiple bugs about it, but no conclusive fix: https://bugs.llvm.org/show_bug.cgi?id=18964 https://bugs.llvm.org/show_bug.cgi?id=19995 https://bugs.llvm.org/show_bug.cgi?id=21854 https://bugs.llvm.org/show_bug.cgi?id=23090 https://bugs.llvm.org/show_bug.cgi?id=33503 I'll see if I can get some movement on this upstream, and close off a bunch of duplicates.