diff --git a/src/V3Options.cpp b/src/V3Options.cpp
index 184d92c5b..455050a66 100644
--- a/src/V3Options.cpp
+++ b/src/V3Options.cpp
@@ -374,7 +374,12 @@ string V3Options::filePath(FileLine* fl, const string& modname, const string& la
void V3Options::filePathLookedMsg(FileLine* fl, const string& modname) {
static bool shown_notfound_msg = false;
- if (!shown_notfound_msg) {
+ if (modname.find("__Vhsh") != string::npos) {
+ std::cerr << V3Error::warnMore() << "... Unsupported: Name is longer than 127 characters;"
+ << " automatic file lookup not supported.\n";
+ std::cerr << V3Error::warnMore() << "... Suggest putting filename with this module/package"
+ << " onto command line instead.\n";
+ } else if (!shown_notfound_msg) {
shown_notfound_msg = true;
if (m_impp->m_incDirUsers.empty()) {
fl->v3error("This may be because there's no search path specified with -I
."< 1);
+
+my $length = 200;
+my $long = "long_" x (($length + 4) / 5);
+
+sub gen_top {
+ my $filename = shift;
+
+ my $fh = IO::File->new(">$filename")
+ or $Self->error("Can't write $filename");
+ $fh->print("// Generated by t_inst_long.pl\n");
+ $fh->print("module t;\n");
+ $fh->print("\n");
+ $fh->print(" ${long} inst ();\n");
+ $fh->print("\n");
+ $fh->print("endmodule\n");
+ $fh->close;
+}
+
+sub gen_sub {
+ my $filename = shift;
+
+ my $fh = IO::File->new(">$filename")
+ or $Self->error("Can't write $filename");
+ $fh->print("// Generated by t_inst_long.pl\n");
+ $fh->print("module ${long};\n");
+ $fh->print("\n");
+ $fh->print(" initial begin\n");
+ $fh->print(" \$write(\"*-* All Finished *-*\\n\");\n");
+ $fh->print(" \$finish;\n");
+ $fh->print(" end\n");
+ $fh->print("endmodule\n");
+ $fh->close;
+}
+
+top_filename("$Self->{obj_dir}/t_inst_long.v", $long);
+
+gen_top($Self->{top_filename});
+gen_sub("$Self->{obj_dir}/${long}.v");
+
+lint(
+ fails => 1,
+ expect_filename => $Self->{golden_filename},
+ );
+
+ok(1);
+1;