<div dir="ltr"><div>I'm trying to compile NAMD using bgclang, and have encountered compiler crashes on three of its source files. These crashes are each distinct, and so may provide an interesting looks at lingering bugs in the compiler port.<br>
<br></div>A summary of the reports is as follows<br>======<br>1. <eof> parser at end of file<br>2. Code generation<br>3. Running pass 'Function Pass Manager' on module 'src/Output.C'.<br>
4. Running pass 'Machine Loop Invariant Code Motion' on function '@_ZNK7Lattice18wrap_nearest_deltaE6Vector'<br>clang: error: unable to execute command: Segmentation fault (core dumped)<br>clang: error: clang frontend command failed due to signal (use -v to see invocation)<br>
======<br>1. <eof> parser at end of file<br>2. Per-module optimization passes<br>3. Running pass 'CallGraph Pass Manager' on module 'src/msm_longrng_sprec.c'.<br>clang: error: unable to execute command: Aborted (core dumped)<br>
clang: error: clang frontend command failed due to signal (use -v to see invocation)<br>======<br>Instruction does not dominate all uses!<br> %332 = insertelement <4 x float> undef, float %sub183, i32 0, !dbg !21275<br>
%329 = insertelement <4 x float> %332, float %328, i32 1, !dbg !21275<br>Instruction does not dominate all uses!<br> %539 = insertelement <4 x float> undef, float %sub445, i32 0, !dbg !21307<br> %536 = insertelement <4 x float> %539, float %535, i32 1, !dbg !21307<br>
Instruction does not dominate all uses!<br> %586 = insertelement <4 x float> undef, float %sub518, i32 0, !dbg !21316<br> %583 = insertelement <4 x float> %586, float %582, i32 1, !dbg !21316<br>fatal error: error in backend: Broken function found, compilation aborted!<br>
clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)<br><div>======<br><br>Full details, including pre-processed source and the compilation transcript with the diagnostic output can be found at vesta:/home/phil/bgclang-namd-crash.tar<br>
<br></div><div>When I drop '-O3' from the compilation commands, all three files compile without any reported error. Whether they're compiled correctly or not is undetermined (due to other missing xlc/gcc features that NAMD uses, which I'll email about separately).<br>
</div></div>