The attached testcases crashes the compiler.
Linux x86_64
g++ (Ubuntu 7.4.0-9ubuntu1~18.04.york0) 7.4.0
iverilog 10.1
Output is:
3.v:2: syntax error
3.v:2: error: invalid module item.
3.v:3: error: Module definition a cannot nest into module m.
3.v:3: syntax error
3.v:5: error: invalid module item.
ivl: pform.cc:1255: void pform_endmodule(const char*, bool, Module::UCDriveType): Assertion `strcmp(name, mod_name) == 0' failed.
Aborted
This also fails on the latest version from git.
Fixed in git master and v10-branch