diff options
-rw-r--r-- | testsuite/gna/ticket101/junk2.vhdl | 7 | ||||
-rwxr-xr-x | testsuite/gna/ticket101/testsuite.sh | 10 | ||||
-rw-r--r-- | testsuite/testenv.sh | 10 |
3 files changed, 25 insertions, 2 deletions
diff --git a/testsuite/gna/ticket101/junk2.vhdl b/testsuite/gna/ticket101/junk2.vhdl new file mode 100644 index 0000000..bece38f --- /dev/null +++ b/testsuite/gna/ticket101/junk2.vhdl @@ -0,0 +1,7 @@ +package t_Junk2 is
+ type ufixed is array (integer range <>) of bit;
+ type t_MULTIPLIERS is array(15 downto -16) of ufixed(7 downto -8);
+-- type t_MULTIPLIERS is array(15 downto 1) of ufixed(7 downto -1); -- Will compile correctly
+-- type t_MULTIPLIERS is array(15 downto -1) of ufixed(7 downto 1); -- Will not compile correctly
+end package t_Junk2;
+
diff --git a/testsuite/gna/ticket101/testsuite.sh b/testsuite/gna/ticket101/testsuite.sh new file mode 100755 index 0000000..927e66c --- /dev/null +++ b/testsuite/gna/ticket101/testsuite.sh @@ -0,0 +1,10 @@ +#! /bin/sh + +. ../../testenv.sh + +analyze junk2.vhdl +analyze_failure --std=93 junk2.vhdl +analyze --std=02 -frelaxed-rules junk2.vhdl +clean + +echo "Test successful" diff --git a/testsuite/testenv.sh b/testsuite/testenv.sh index 60dc09e..21a681d 100644 --- a/testsuite/testenv.sh +++ b/testsuite/testenv.sh @@ -124,7 +124,13 @@ clean () echo "Remove work library" "$GHDL" --remove $GHDL_STD_FLAGS else - echo "Remove $1 library" - "$GHDL" --remove $GHDL_STD_FLAGS --work=$1 + case "$1" in + --std=*) + echo "Remove work library" + "$GHDL" --remove $1 ;; + *) + echo "Remove $1 library" + "$GHDL" --remove $GHDL_STD_FLAGS --work=$1 ;; + esac fi } |