diff options
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/gna/issue1387/repro4.vhdl | 42 | ||||
-rwxr-xr-x | testsuite/gna/issue1387/testsuite.sh | 2 |
2 files changed, 44 insertions, 0 deletions
diff --git a/testsuite/gna/issue1387/repro4.vhdl b/testsuite/gna/issue1387/repro4.vhdl new file mode 100644 index 000000000..2f09a60f4 --- /dev/null +++ b/testsuite/gna/issue1387/repro4.vhdl @@ -0,0 +1,42 @@ +package repro4 is + constant v : bit_vector := x"01"; + + function f1 (a : natural := v'length) return natural; + function f2 (a : natural := v'left) return natural; + function f3 (a : natural := v'right) return natural; + function f4 (a : natural := v'high) return natural; + function f5 (a : natural := v'low) return natural; + function f6 (a : boolean := v'ascending) return natural; +end; + +package body repro4 is + function f1 (a : natural := v'length) return natural is + begin + return 1; + end; + + function f2 (a : natural := v'left) return natural is + begin + return 1; + end; + + function f3 (a : natural := v'right) return natural is + begin + return 1; + end; + + function f4 (a : natural := v'high) return natural is + begin + return 1; + end; + + function f5 (a : natural := v'low) return natural is + begin + return 1; + end; + + function f6 (a : boolean := v'ascending) return natural is + begin + return 1; + end; +end; diff --git a/testsuite/gna/issue1387/testsuite.sh b/testsuite/gna/issue1387/testsuite.sh index 8c89d92cc..74921ddc7 100755 --- a/testsuite/gna/issue1387/testsuite.sh +++ b/testsuite/gna/issue1387/testsuite.sh @@ -9,6 +9,8 @@ analyze repro2.vhdl analyze repro3.vhdl elab_simulate repro3 +analyze repro4.vhdl + clean echo "Test successful" |