From f1546abf094b44a795a2edd3e8c73d5be319058f Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Mon, 20 Feb 2012 09:02:59 -0500 Subject: [PATCH] Fix error when using UDPs without --bbox-unsup --- src/V3LinkResolve.cpp | 2 +- test_regress/t/t_lint_unused_bad.pl | 2 +- test_regress/t/t_udp_bad.pl | 24 ++++++++++++++++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100755 test_regress/t/t_udp_bad.pl diff --git a/src/V3LinkResolve.cpp b/src/V3LinkResolve.cpp index bded61632..984c901ab 100644 --- a/src/V3LinkResolve.cpp +++ b/src/V3LinkResolve.cpp @@ -366,8 +366,8 @@ private: } } } + nodep->unlinkFrBack(); pushDeletep(nodep); nodep=NULL; } - nodep->unlinkFrBack(); pushDeletep(nodep); nodep=NULL; } virtual void visit(AstScCtor* nodep, AstNUser*) { diff --git a/test_regress/t/t_lint_unused_bad.pl b/test_regress/t/t_lint_unused_bad.pl index bfd0c1e5a..e97e36607 100755 --- a/test_regress/t/t_lint_unused_bad.pl +++ b/test_regress/t/t_lint_unused_bad.pl @@ -10,7 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di $Self->{vlt} or $Self->skip("Verilator only test"); compile ( - v_flags2 => ["--lint-only --bbox-sys -Wall -Wno-DECLFILENAME"], + v_flags2 => ["--lint-only --bbox-sys --bbox-unsup -Wall -Wno-DECLFILENAME"], fails=>1, verilator_make_gcc => 0, make_top_shell => 0, diff --git a/test_regress/t/t_udp_bad.pl b/test_regress/t/t_udp_bad.pl new file mode 100755 index 000000000..90ce4fa3c --- /dev/null +++ b/test_regress/t/t_udp_bad.pl @@ -0,0 +1,24 @@ +#!/usr/bin/perl +if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } +# DESCRIPTION: Verilator: Verilog Test driver/expect definition +# +# Copyright 2003 by Wilson Snyder. This program is free software; you can +# redistribute it and/or modify it under the terms of either the GNU +# Lesser General Public License Version 3 or the Perl Artistic License +# Version 2.0. + +top_filename("t/t_udp.v"); + +compile ( + fails=>$Self->{vlt}, + expect=> +'%Error: t/t_udp.v:\d+: Unsupported: Verilog 1995 UDP Tables. Use --bbox-unsup to ignore tables. +%Error: t/t_udp.v:\d+: Unsupported: Verilog 1995 UDP Tables. Use --bbox-unsup to ignore tables. +%Error: Exiting due to ' + ); + +execute ( + ) if !$Self->{vlt}; + +ok(1); +1;