Skip to content

Invalid InsertValueInst operands! #35125

@stbergmann

Description

@stbergmann
Bugzilla Link 35777
Resolution FIXED
Resolved on Jan 17, 2018 08:04
Version trunk
OS Linux
Blocks #35152
CC @alexey-bataev,@dtemirbulatov,@zmodem,@RKSimon
Fixed by commit(s) 321994

Extended Description

At least with recent trunk towards 6.0 built with -DLLVM_ENABLE_ASSERTIONS=ON I get the following error:

$ cat test.cc
struct S {
long a, b;
S(long x, long y): a(x), b(y) {}
};
double a[6];
S f(double y) { return S(int(a[0] + ya[2] + a[4]), int(a[1] + ya[3] + a[5])); }

$ clang++ -O2 -c test.cc -v
clang version 6.0.0
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/sbergman/llvm/inst/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/7
Selected GCC installation: /usr/lib/gcc/x86_64-redhat-linux/7
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64
"/home/sbergman/llvm/inst/bin/clang-6.0" -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name test.cc -mrelocation-model static -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb -momit-leaf-frame-pointer -v -coverage-notes-file /home/sbergman/lo2/core/test.gcno -resource-dir /home/sbergman/llvm/inst/lib/clang/6.0.0 -internal-isystem /usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7 -internal-isystem /usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/x86_64-redhat-linux -internal-isystem /usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/backward -internal-isystem /usr/local/include -internal-isystem /home/sbergman/llvm/inst/lib/clang/6.0.0/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O2 -fdeprecated-macro -fdebug-compilation-dir /home/sbergman/lo2/core -ferror-limit 19 -fmessage-length 113 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -vectorize-loops -vectorize-slp -o test.o -x c++ test.cc
clang -cc1 version 6.0.0 based upon LLVM 6.0.0svn default target x86_64-unknown-linux-gnu
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7
/usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/x86_64-redhat-linux
/usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/backward
/usr/local/include
/home/sbergman/llvm/inst/lib/clang/6.0.0/include
/usr/include
End of search list.
Invalid InsertValueInst operands!
%.fca.0.insert = insertvalue { i64, i64 } undef, i32 %9, 0
Invalid InsertValueInst operands!
%.fca.1.insert = insertvalue { i64, i64 } %.fca.0.insert, i32 %10, 1
fatal error: error in backend: Broken function found, compilation aborted!
clang-6.0: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 6.0.0
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/sbergman/llvm/inst/bin
clang-6.0: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.
clang-6.0: note: diagnostic msg:


PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-6.0: note: diagnostic msg: /tmp/test-bd3d95.cpp
clang-6.0: note: diagnostic msg: /tmp/test-bd3d95.sh
clang-6.0: note: diagnostic msg:


Metadata

Metadata

Assignees

Labels

bugzillaIssues migrated from bugzillaclangClang issues not falling into any other category

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions