From ae9bcf634f5a556a3768adb866df82435e20fb10 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sun, 30 Apr 2023 19:14:14 +0200 Subject: testsuite/gna: add a reproducer for #2427 --- testsuite/gna/issue2427/pkg.vhdl | 15 +++++++++++++++ testsuite/gna/issue2427/testsuite.sh | 13 +++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 testsuite/gna/issue2427/pkg.vhdl create mode 100755 testsuite/gna/issue2427/testsuite.sh diff --git a/testsuite/gna/issue2427/pkg.vhdl b/testsuite/gna/issue2427/pkg.vhdl new file mode 100644 index 000000000..ba7064020 --- /dev/null +++ b/testsuite/gna/issue2427/pkg.vhdl @@ -0,0 +1,15 @@ +library IEEE; +use IEEE.STD_LOGIC_1164.all; + +package pkg is + attribute Bits : integer; + + type MY_TYPE is array (5 downto 0) of std_logic_vector(7 downto 0); + attribute Bits of MY_TYPE : type is 6 * 8; --Error + + type MY_RECORD is record + sig : std_logic; + end record; + attribute Bits of MY_RECORD : type is 3 + 3; --No Error + +end package; diff --git a/testsuite/gna/issue2427/testsuite.sh b/testsuite/gna/issue2427/testsuite.sh new file mode 100755 index 000000000..b00250c15 --- /dev/null +++ b/testsuite/gna/issue2427/testsuite.sh @@ -0,0 +1,13 @@ +#! /bin/sh + +. ../../testenv.sh + +export GHDL_STD_FLAGS=--std=93 +analyze_failure pkg.vhdl + +export GHDL_STD_FLAGS=--std=93c +analyze pkg.vhdl + +clean + +echo "Test successful" -- cgit v1.2.3