aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/bug23013
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2014-12-02 08:00:36 +0100
committerTristan Gingold <tgingold@free.fr>2014-12-02 08:00:36 +0100
commitd10afd56d89ca9654e22de141496bf06ceeaa2f4 (patch)
tree78b8e626a6f2fccce495b58f9d02bdabec224074 /testsuite/gna/bug23013
parenta30f7137ff1efe33174f840e3fe16d35cd554d97 (diff)
downloadghdl-d10afd56d89ca9654e22de141496bf06ceeaa2f4.tar.gz
ghdl-d10afd56d89ca9654e22de141496bf06ceeaa2f4.tar.bz2
ghdl-d10afd56d89ca9654e22de141496bf06ceeaa2f4.zip
Add reproducer from gna bug 23013.
Diffstat (limited to 'testsuite/gna/bug23013')
-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"