Icarus currently only supports a single output. Gates that accept multiple outputs leave the unconnected outputs floating (pulldown/pullup) or in the case of the buf/not gates the first floating output is used as the input! I will send in a patch to check for this and other primitive port inconsistencies. For now the checks limit you to a single output to prevent unexpected results. The attached file can be used to demonstrate the problem, though once the patch is applied these will be caught as elaboration errors.
Verilog source file
Logged In: YES
user_id=1651735
Originator: YES
This is a gating item for solving pr1750878.
Logged In: YES
user_id=97566
Originator: NO
I think I might take this on over my July vacation. Looks not too hard.
Logged In: YES
user_id=97566
Originator: NO
test
Logged In: YES
user_id=1651735
Originator: YES
As you probably already realize you solved pr1750878 with a different technique, so this is now just the simple gates (buf, not, pullup, pulldown).
I'm working on getting support for multiple-output gates working properly, so I'm claiming this item for now.
I've pushed into git master a patch that makes the example work properly. It appears in the source that there are cases that are not yet covered (and should trigger assertions) but I've not been able to make them trip at this late hour in a Sunday evening. It's possible that the special case of a single input makes those cases impossible, but I need to at least document that, so this bug report stays open (yet fixed) until I work out the extra details.
Here's a more test suite ready example.
File Added: pr1787423.v
Example file
Now completely fixed in git master. (See pr1787423c.v in the ivtest suite.)