mirror of
https://github.com/verilator/verilator.git
synced 2025-01-05 22:27:35 +00:00
Tests: Fix gcc7.2 warnings.
This commit is contained in:
parent
097107bd0b
commit
e07ee559a0
@ -167,9 +167,11 @@ AC_DEFUN([_MY_CXX_CHECK_OPT],
|
||||
# Macros work such that first option that passes is the one we take
|
||||
# gnu++14 is the newest that Verilator supports
|
||||
# std++03 is the oldest that Verilator supports
|
||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=gnu++17)
|
||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=gnu++14)
|
||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=gnu++11)
|
||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=gnu++03)
|
||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=c++17)
|
||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=c++14)
|
||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=c++11)
|
||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=c++03)
|
||||
@ -179,6 +181,7 @@ AC_SUBST(CFG_CXXFLAGS_STD_NEWEST)
|
||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=std++03)
|
||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=std++11)
|
||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=std++14)
|
||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=std++17)
|
||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=gnu++03)
|
||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=gnu++11)
|
||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=gnu++14)
|
||||
@ -218,6 +221,7 @@ AC_SUBST(CFG_CXXFLAGS_PARSER)
|
||||
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_NO_UNUSED,-faligned-new)
|
||||
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_NO_UNUSED,-fbracket-depth=4096)
|
||||
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_NO_UNUSED,-Qunused-arguments)
|
||||
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_NO_UNUSED,-Wno-bool-operation)
|
||||
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_NO_UNUSED,-Wno-parentheses-equality)
|
||||
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_NO_UNUSED,-Wno-sign-compare)
|
||||
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_NO_UNUSED,-Wno-uninitialized)
|
||||
|
@ -663,7 +663,7 @@ sub compile {
|
||||
elsif ($param{vlt}) {
|
||||
my @cmdargs = $self->compile_vlt_flags(%param);
|
||||
|
||||
if ($self->sc && !defined $ENV{SYSTEMC} && !defined $ENV{SYSTEMC_INCLUDE}) {
|
||||
if ($self->sc && !$self->have_sc) {
|
||||
$self->skip("Test requires SystemC; ignore error since not installed\n");
|
||||
return 1;
|
||||
}
|
||||
@ -911,6 +911,12 @@ sub sc {
|
||||
return $self->{sc};
|
||||
}
|
||||
|
||||
sub have_sc {
|
||||
#my $self = shift;
|
||||
return 1 if (defined $ENV{SYSTEMC} || defined $ENV{SYSTEMC_INCLUDE});
|
||||
return 0;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
sub run {
|
||||
|
@ -16,7 +16,7 @@ int main (int argc, char *argv[]) {
|
||||
Verilated::debug(0);
|
||||
|
||||
// Make sure public tag worked
|
||||
if (static_cast<bool>(Vt_param_public_p::INPACK)) {}
|
||||
if (static_cast<int>(Vt_param_public_p::INPACK) != 0) {}
|
||||
|
||||
for (int i = 0; i < 10; i++) {
|
||||
topp->eval();
|
||||
|
@ -7,21 +7,26 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||
# Version 2.0.
|
||||
|
||||
top_filename("t/t_trace_ena.v");
|
||||
if (!$Self->have_sc) {
|
||||
$Self->skip("No SystemC installed");
|
||||
}
|
||||
else {
|
||||
top_filename("t/t_trace_ena.v");
|
||||
|
||||
compile (
|
||||
verilator_flags2 => ['-trace -sc'],
|
||||
);
|
||||
compile (
|
||||
verilator_flags2 => ['-trace -sc'],
|
||||
);
|
||||
|
||||
execute (
|
||||
check_finished=>1,
|
||||
);
|
||||
execute (
|
||||
check_finished=>1,
|
||||
);
|
||||
|
||||
if ($Self->{vlt}) {
|
||||
# Note more checks in _cc.pl
|
||||
file_grep ("$Self->{obj_dir}/simx.vcd", qr/\$enddefinitions/x);
|
||||
if ($Self->{vlt}) {
|
||||
# Note more checks in _cc.pl
|
||||
file_grep ("$Self->{obj_dir}/simx.vcd", qr/\$enddefinitions/x);
|
||||
|
||||
vcd_identical("$Self->{obj_dir}/simx.vcd", "t/$Self->{name}.out");
|
||||
vcd_identical("$Self->{obj_dir}/simx.vcd", "t/$Self->{name}.out");
|
||||
}
|
||||
}
|
||||
|
||||
ok(1);
|
||||
|
@ -14,6 +14,7 @@ my $root = "..";
|
||||
compile (
|
||||
# Can't use --coverage and --savable together, so cheat and compile inline
|
||||
verilator_flags2 => ['--cc --coverage-toggle --coverage-line --coverage-user --trace --vpi $root/include/verilated_save.cpp'],
|
||||
make_flags => 'DRIVER_STD=newest',
|
||||
);
|
||||
|
||||
execute (
|
||||
|
@ -17,5 +17,14 @@ $Self->run(cmd=>["../bin/verilator_coverage",
|
||||
"t/t_vlcov_data_d.dat",
|
||||
],
|
||||
);
|
||||
ok(files_identical("$Self->{obj_dir}/coverage.dat", "t/$Self->{name}.out"));
|
||||
|
||||
# Older clib's didn't properly sort maps, but the coverage data doesn't
|
||||
# really care about ordering. So avoid false failures by sorting.
|
||||
$Self->run(cmd=>["sort",
|
||||
"$Self->{obj_dir}/coverage.dat",
|
||||
"> $Self->{obj_dir}/coverage-sort.dat",
|
||||
],
|
||||
);
|
||||
|
||||
ok(files_identical("$Self->{obj_dir}/coverage-sort.dat", "t/$Self->{name}.out"));
|
||||
1;
|
||||
|
Loading…
Reference in New Issue
Block a user