diff options
-rw-r--r-- | testsuite/gna/bug15/phys.vhdl | 24 | ||||
-rw-r--r-- | testsuite/gna/bug15/phys2.vhdl | 14 | ||||
-rwxr-xr-x | testsuite/gna/bug15/testsuite.sh | 12 |
3 files changed, 50 insertions, 0 deletions
diff --git a/testsuite/gna/bug15/phys.vhdl b/testsuite/gna/bug15/phys.vhdl new file mode 100644 index 0000000..5af3359 --- /dev/null +++ b/testsuite/gna/bug15/phys.vhdl @@ -0,0 +1,24 @@ +package physical is + type FREQ is range 0 to INTEGER'high units + Hz; + kHz = 1000 Hz; + MHz = 1000 kHz; + GHz = 1000 MHz; +-- THz = 1000 GHz; + end units; +end package; + +entity tb is +end; + +use work.physical.all; + +architecture test of tb is + constant CLOCK_FREQ : FREQ := 100.0 MHz; + procedure p (a : freq := 1.0 Mhz) is + begin + end p; +begin + p (clock_freq); + -- empty +end architecture; diff --git a/testsuite/gna/bug15/phys2.vhdl b/testsuite/gna/bug15/phys2.vhdl new file mode 100644 index 0000000..3c0957f --- /dev/null +++ b/testsuite/gna/bug15/phys2.vhdl @@ -0,0 +1,14 @@ +entity tb2 is +end; + +use work.physical.all; + +architecture test of tb2 is + constant CLOCK_FREQ : FREQ := MHz; + procedure p (a : freq) is + begin + end p; +begin + p (clock_freq); + -- empty +end architecture; diff --git a/testsuite/gna/bug15/testsuite.sh b/testsuite/gna/bug15/testsuite.sh new file mode 100755 index 0000000..59c4a42 --- /dev/null +++ b/testsuite/gna/bug15/testsuite.sh @@ -0,0 +1,12 @@ +#! /bin/sh + +. ../../testenv.sh + +analyze phys.vhdl +elab_simulate tb + +analyze phys2.vhdl +elab_simulate tb2 +clean + +echo "Test successful" |