aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorAdam Izraelevitz2018-05-09 10:19:45 -0700
committerGitHub2018-05-09 10:19:45 -0700
commit77cfdbf05cafa78946a5684a0e4a530ebecd6547 (patch)
tree6b0a4d288cb5adb518b3b9e09d3762fb93c050f7 /src/test
parent227a523c327c63144544312aab01c164a67c2a94 (diff)
Bugfix: ports of a temporary name would break const-prop (#806)
Diffstat (limited to 'src/test')
-rw-r--r--src/test/scala/firrtlTests/ConstantPropagationTests.scala17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/scala/firrtlTests/ConstantPropagationTests.scala b/src/test/scala/firrtlTests/ConstantPropagationTests.scala
index c798ba37..19fe20c9 100644
--- a/src/test/scala/firrtlTests/ConstantPropagationTests.scala
+++ b/src/test/scala/firrtlTests/ConstantPropagationTests.scala
@@ -1030,4 +1030,21 @@ class ConstantPropagationIntegrationSpec extends LowTransformSpec {
|""".stripMargin
execute(input, check, Seq.empty)
}
+
+ "Temporary named port" should "not be declared as a node" in {
+ val input =
+ """circuit Top :
+ | module Top :
+ | input _T_61 : UInt<1>
+ | output z : UInt<1>
+ | node a = _T_61
+ | z <= a""".stripMargin
+ val check =
+ """circuit Top :
+ | module Top :
+ | input _T_61 : UInt<1>
+ | output z : UInt<1>
+ | z <= _T_61""".stripMargin
+ execute(input, check, Seq.empty)
+ }
}