Fix display with multiple string formats (#5311).

This commit is contained in:
Wilson Snyder 2024-09-11 08:41:11 -04:00
parent f4e4602dcb
commit 22d6bb8180
4 changed files with 4 additions and 1 deletions

View File

@ -26,6 +26,7 @@ Verilator 5.029 devel
* Add method to check if there are VPI callbacks of the given type (#5399). [Kaleb Barrett]
* Improve Verilation thread pool (#5161). [Bartłomiej Chmiel, Antmicro Ltd.]
* Improve performance of V3VariableOrder with parallelism (#5406). [Bartłomiej Chmiel, Antmicro Ltd.]
* Fix display with multiple string formats (#5311). [Luiza de Melo]
* Fix performance of V3Trace when many activity blocks (#5372). [Deniz Güzel]
* Fix REALCVT warning on integral timescale conversions (#5378). [Liam Braun]
* Fix multidimensional function return value selects (#5382). [Gökçe Aydos]

View File

@ -5181,7 +5181,7 @@ class WidthVisitor final : public VNVisitor {
ch = 'g';
} else if (argp && argp->isString()) {
ch = '@';
} else if (nodep->missingArgChar() == 'd' && argp->isSigned()) {
} else if (argp && nodep->missingArgChar() == 'd' && argp->isSigned()) {
ch = '~';
} else if (basicp) {
ch = nodep->missingArgChar();

View File

@ -65,6 +65,7 @@ assoc_c='{}
[0] hello, from a very long string. Percent %s are literally substituted in.
hello, from a concatenated string.
hello, from a concatenated format string [0].
two 2 args 3with commas
extra argument: 0
0 : pre argument after
empty: > <

View File

@ -164,6 +164,7 @@ module t;
"hel", "lo, fr", "om a very long string. Percent %s are literally substituted in.");
$display("hel", "lo, fr", "om a concatenated string.");
$write("hel", "lo, fr", "om a concatenated format string [%0t].\n", $time);
$display("two %d", 2, " args %d", 3, "with commas");
$display("extra argument: ", $time);
$display($time,, ": pre argument",, "after");
$display("empty: >%s<", "");