From 3b5103cbaa0ed4a78a54d30671512e513df517bb Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Tue, 20 Jun 2023 20:05:44 +0100 Subject: [PATCH] Add regression test for issue #725 --- test/lower/issue725.vhd | 7 +++++++ test/test_lower.c | 13 +++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 test/lower/issue725.vhd diff --git a/test/lower/issue725.vhd b/test/lower/issue725.vhd new file mode 100644 index 00000000..164cd095 --- /dev/null +++ b/test/lower/issue725.vhd @@ -0,0 +1,7 @@ +package test is + type t_slv_array is array (natural range <>) of bit_vector; + subtype t_word is bit_vector(15 downto 0); + subtype t_word_array is t_slv_array(open)(t_word'range); + subtype t_addr is natural range 1 to 30; + type t_data is array (t_addr) of t_word_array(0 to 31); -- OK +end package test; diff --git a/test/test_lower.c b/test/test_lower.c index ffb9fa09..12e03246 100644 --- a/test/test_lower.c +++ b/test/test_lower.c @@ -5135,6 +5135,18 @@ START_TEST(test_event1) } END_TEST +START_TEST(test_issue725) +{ + set_standard(STD_08); + + input_from_file(TESTDIR "/lower/issue725.vhd"); + + parse_check_simplify_and_lower(T_PACKAGE); + + fail_if_errors(); +} +END_TEST + Suite *get_lower_tests(void) { Suite *s = suite_create("lower"); @@ -5260,6 +5272,7 @@ Suite *get_lower_tests(void) tcase_add_test(tc, test_copy1); tcase_add_test(tc, test_issue662); tcase_add_test(tc, test_event1); + tcase_add_test(tc, test_issue725); suite_add_tcase(s, tc); return s; -- 2.39.2