diff options
author | Tristan Gingold <gingold@adacore.com> | 2015-12-21 19:51:38 +0100 |
---|---|---|
committer | Tristan Gingold <gingold@adacore.com> | 2015-12-21 19:51:38 +0100 |
commit | 39a34058f1de6c2c80b9f39fe36890f66a111f86 (patch) | |
tree | 569357f0c02fd8929fefa0f62e902ffc3fd58319 /testsuite | |
parent | 87514d8d3e2e23e4b2879998e9516ab2a9882c55 (diff) | |
download | ghdl-39a34058f1de6c2c80b9f39fe36890f66a111f86.tar.gz ghdl-39a34058f1de6c2c80b9f39fe36890f66a111f86.tar.bz2 ghdl-39a34058f1de6c2c80b9f39fe36890f66a111f86.zip |
Add testcase for ticket101.
Diffstat (limited to 'testsuite')
-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 000000000..bece38ff4 --- /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 000000000..927e66c10 --- /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 60dc09eca..21a681d26 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 } |