The following seg faults: template A(T) { static foreach(I; 0 .. 1) { } alias A = T; } void main() { A!int a; } $ dmd -o- -X main.d Comment out the static foreach and it won't segfault anymore. Tried with dmd v2.079.0-beta.1 and dmd v2.078.3 locally, and on run.dlang.io you get: Since 2.076.1: Segfault and no output https://run.dlang.io/is/SliEb2
It seems to be fixed: $ dmd -o- -X main.d Error: module `main` is in file 'main.d' which cannot be read import path[0] = /snap/dmd/49/bin/../import/druntime import path[1] = /snap/dmd/49/bin/../import/phobos t,1$ dmd --version DMD64 D Compiler v2.084.1 Copyright (C) 1999-2018 by The D Language Foundation, All Rights Reserved written by Walter Bright