The compiler hits an assert on the attached testcase.
Linux x86_64
g++ (Ubuntu 7.4.0-9ubuntu1~18.04.york0) 7.4.0
iverilog latest from git
Output:
../../submit/6.v:1: syntax error
../../submit/6.v:1: error: invalid module item.
../../submit/6.v:2: error: Module definition a cannot nest into module m.
../../submit/6.v:2: syntax error
../../submit/6.v:3: error: invalid module item.
ivl: pform.cc:1329: void pform_endmodule(const char*, bool, Module::UCDriveType): Assertion `strcmp(name, mod_name) == 0' failed.
Aborted
This may be a duplicate of bug #1039.
This seems to be already fixed. It does indeed look like the fix for #1039 also fixed this one.