aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/gna')
-rw-r--r--testsuite/gna/bug23013/attrs.vhdl27
-rwxr-xr-xtestsuite/gna/bug23013/testsuite.sh9
2 files changed, 36 insertions, 0 deletions
diff --git a/testsuite/gna/bug23013/attrs.vhdl b/testsuite/gna/bug23013/attrs.vhdl
new file mode 100644
index 000000000..9cb9c4027
--- /dev/null
+++ b/testsuite/gna/bug23013/attrs.vhdl
@@ -0,0 +1,27 @@
+package attributes_pkg is
+ attribute period :time;
+end package;
+
+
+library work;
+use work.attributes_pkg.period;
+entity inner is
+ port(
+ signal clk :in bit
+ );
+end entity;
+architecture arch of inner is
+ constant CLK_PERIOD :time := clk'period;
+begin
+end architecture;
+
+
+library work;
+use work.attributes_pkg.period;
+entity outer is end entity;
+architecture arch of outer is
+ signal clk :bit;
+ attribute period of clk :signal is 1 ns;
+begin
+ inst: entity work.inner port map(clk);
+end architecture;
diff --git a/testsuite/gna/bug23013/testsuite.sh b/testsuite/gna/bug23013/testsuite.sh
new file mode 100755
index 000000000..518a1082c
--- /dev/null
+++ b/testsuite/gna/bug23013/testsuite.sh
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze_failure attrs.vhdl
+
+clean
+
+echo "Test successful"