Fix false failure on clang 3.8

This commit is contained in:
Wilson Snyder 2017-10-26 19:14:05 -04:00
parent 4e98d96755
commit 350932e9c0
4 changed files with 22 additions and 5 deletions

View File

@ -73,6 +73,12 @@ random_forever:
echo ; \
done
#######################################################################
# Informational - used by some tests
print-cxx-version:
$(CXX) --version
######################################################################
maintainer-copy::
clean mostlyclean distclean maintainer-clean::

View File

@ -1506,6 +1506,12 @@ sub _vcd_read {
return $data;
}
our $_Cxx_Version;
sub cxx_version {
$_Cxx_Version ||= `make -f Makefile print-cxx-version`;
return $_Cxx_Version;
}
sub file_grep_not {
my $self = (ref $_[0]? shift : $Self);
my $filename = shift;

View File

@ -56,11 +56,11 @@ module t;
if (str2 !== "lib=t") $stop;
str3 = $sformatf("u=%u", {"a","b","c","d"}); // Value selected so is printable
`ifdef TEST_VERBOSE $display("chku %0x %s",str3,str3); `endif
`ifdef TEST_VERBOSE $display("chku %s %s",str3,str3); `endif
if (str3 !== "u=dcba") $stop;
str3 = $sformatf("v=%v", {"a","b","c","d"}); // Value selected so is printable
`ifdef TEST_VERBOSE $display("chkv %0x %s",str3,str3); `endif
`ifdef TEST_VERBOSE $display("chkv %s %s",str3,str3); `endif
$sformat(ochar,"%s","c");
if (ochar != "c") $stop;

View File

@ -14,9 +14,14 @@ compile (
verilator_flags2 => ["-O0"],
);
execute (
check_finished=>1,
);
if ($Self->cxx_version =~ /clang version 3.8/) {
$Self->skip("Known clang bug");
#Here: if (VL_UNLIKELY(VL_NEQ_W(12, __Vtemp1, vlSymsp->TOP__t.__PVT__str)))
} else{
execute (
check_finished=>1,
);
}
ok(1);
1;