Happens with v1.0 and master.
debian-jessie64(robert)brain-labs$ git describe --tags
v1.0
debian-jessie64(robert)brain-labs$ clang++ --version
clang version 5.0.0 (tags/RELEASE_500/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
debian-jessie64(robert)brain-labs$
debian-jessie64(robert)brain-labs$ ~/bfi/bf.bin/bfi -c tests/helloworld.b > c.cpp
debian-jessie64(robert)brain-labs$ clang++ -O3 -o c c.cpp
debian-jessie64(robert)brain-labs$ ./c
Hello World!
debian-jessie64(robert)brain-labs$
debian-jessie64(robert)brain-labs$ gdb -args bin/brain tests/helloworld.b GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from bin/brain...done.
(gdb) run
Starting program: /home/robert/brain-labs/bin/brain tests/helloworld.b
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0x0000000000e9c55b in llvm::Value::setNameImpl(llvm::Twine const&) ()
(gdb) bt
#0 0x0000000000e9c55b in llvm::Value::setNameImpl(llvm::Twine const&) ()
#1 0x0000000000e9c9b9 in llvm::Value::setName(llvm::Twine const&) ()
#2 0x0000000000e3cfd5 in llvm::Function::BuildLazyArguments() const ()
#3 0x000000000073c2b4 in llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) ()
#4 0x000000000073b5a3 in llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) ()
#5 0x00000000004c2071 in (anonymous namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) ()
#6 0x00000000008ae0b6 in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) ()
#7 0x0000000000e6afd3 in llvm::FPPassManager::runOnFunction(llvm::Function&) ()
#8 0x0000000000e6b1c3 in llvm::FPPassManager::runOnModule(llvm::Module&) ()
#9 0x0000000000e6b5c8 in llvm::legacy::PassManagerImpl::run(llvm::Module&) ()
#10 0x0000000000b49b8c in llvm::MCJIT::emitObject(llvm::Module*) ()
#11 0x0000000000b49da4 in llvm::MCJIT::generateCodeForModule(llvm::Module*) ()
#12 0x0000000000b4a7c1 in llvm::MCJIT::finalizeObject() ()
#13 0x000000000042de8c in Bootstrap::init (this=0x1698170, argc=<optimized out>, argv=<optimized out>) at src/utils/Bootstrap.cpp:119
#14 0x00007ffff69ddb45 in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
#15 0x000000000042c6e7 in _start ()
(gdb)