It seems that some optimization of character functions fail because the type is considered incompatible.
For example compiling tango/core/rt/compiler/util/utf.d with any level of optimization (-O for example) fails with
$ ldc -c -I../../tango/tango/core -I../../tango/tango/core/rt/compiler/ldc -I../../tango -I../../tango/tango/core/vendor -O -oftango-core-rt-compiler-util-utf-O3--release--inline.o ../../tango/tango/core/rt/compiler/util/utf.d
ldc: /home/b/becfawzi/d/llvm-28/lib/VMCore/Value.cpp:313: void llvm::Value::replaceAllUsesWith(llvm::Value*): Assertion `New->getType() == getType() && "replaceAllUses of value with new value of different type!"' failed.
0 ldc 0x0000000000e06dff
1 ldc 0x0000000000e08d86
2 libpthread.so.0 0x00002b4f64d2ccb0
3 libc.so.6 0x00002b4f654f2da5 gsignal + 53
4 libc.so.6 0x00002b4f654f41a0 abort + 272
5 libc.so.6 0x00002b4f654ec2e6 __assert_fail + 246
6 ldc 0x0000000000da6de6 llvm::Value::replaceAllUsesWith(llvm::Value*) + 502
7 ldc 0x000000000066940d
8 ldc 0x000000000066a433
9 ldc 0x0000000000d90d2f llvm::FPPassManager::runOnFunction(llvm::Function&) + 623
10 ldc 0x0000000000bcb3b1
11 ldc 0x0000000000bcbc0f
12 ldc 0x0000000000d9088f llvm::MPPassManager::runOnModule(llvm::Module&) + 575
13 ldc 0x0000000000d909f0 llvm::PassManagerImpl::run(llvm::Module&) + 160
14 ldc 0x0000000000667028 ldc_optimize_module(llvm::Module*) + 376
15 ldc 0x0000000000698650 writeModule(llvm::Module*, std::string) + 48
16 ldc 0x000000000065e094 main + 6836
17 libc.so.6 0x00002b4f654e0164 __libc_start_main + 244
18 ldc 0x0000000000580f39 __gxx_personality_v0 + 209
Stack dump:
0. Running pass 'CallGraph Pass Manager' on module 'rt.compiler.util.utf'.
1. Running pass 'Simplify calls to D runtime' on function '@_D2rt8compiler4util3utf7toUTF32FAaZAw'
Aborted
using the latest ldc with llvm 2.8