Skip to content

Commit

Permalink
Fix Bus Error with LLVMFlang
Browse files Browse the repository at this point in the history
Inside of dftd3, there is no check that mol%lattice is not allocated. Therefore, compiler can do some extra optimization which may lead to strange behaviour.
  • Loading branch information
foxtran authored Mar 3, 2025
1 parent f183094 commit f5147af
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/unit/test_dftd3.f90
Original file line number Diff line number Diff line change
Expand Up @@ -928,6 +928,7 @@ subroutine test_pbed3bj_actinides(error)
& 2.01082807362334_wp, 1.34838807211157_wp,-4.70482633508447_wp],&
& [3, 17])
mol%periodic = [.false.]
allocate(mol%lattice(0,0))

call new_rational_damping(param, inp)
call test_dftd3_gen(error, mol, param, -1.4131143363689097E-001_wp)
Expand Down

0 comments on commit f5147af

Please sign in to comment.