aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/issue1009
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-11-06 04:18:25 +0100
committerTristan Gingold <tgingold@free.fr>2019-11-06 04:19:10 +0100
commitc6edf7060590f9207bd82a649f2712d5ac50e427 (patch)
treebbbac221c02cff8f15b2a14bb5950ddf61fdf027 /testsuite/synth/issue1009
parentf7887b6234530f435142c99e0eeb7b67bfe85020 (diff)
downloadghdl-c6edf7060590f9207bd82a649f2712d5ac50e427.tar.gz
ghdl-c6edf7060590f9207bd82a649f2712d5ac50e427.tar.bz2
ghdl-c6edf7060590f9207bd82a649f2712d5ac50e427.zip
Add testcase for #1009
Diffstat (limited to 'testsuite/synth/issue1009')
-rw-r--r--testsuite/synth/issue1009/record_test.vhdl15
-rwxr-xr-xtestsuite/synth/issue1009/testsuite.sh10
2 files changed, 25 insertions, 0 deletions
diff --git a/testsuite/synth/issue1009/record_test.vhdl b/testsuite/synth/issue1009/record_test.vhdl
new file mode 100644
index 000000000..7c8127782
--- /dev/null
+++ b/testsuite/synth/issue1009/record_test.vhdl
@@ -0,0 +1,15 @@
+entity record_test is
+ port (
+ o : out integer
+ );
+end record_test;
+
+architecture rtl of record_test is
+ type t_record is record
+ int : integer;
+ end record t_record;
+ constant rec_constant : t_record := (int => 27.777 us / 83.333 ns);
+ constant rec_constant2 : t_record := rec_constant;
+begin
+ o <= rec_constant2.int;
+end rtl;
diff --git a/testsuite/synth/issue1009/testsuite.sh b/testsuite/synth/issue1009/testsuite.sh
new file mode 100755
index 000000000..54edeede9
--- /dev/null
+++ b/testsuite/synth/issue1009/testsuite.sh
@@ -0,0 +1,10 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+synth record_test.vhdl -e > syn_record_test.vhdl
+analyze syn_record_test.vhdl
+
+clean
+
+echo "Test successful"