summaryrefslogtreecommitdiff
path: root/testsuite/gna/bug15/phys.vhdl
diff options
context:
space:
mode:
authorTristan Gingold2015-06-09 20:16:23 +0200
committerTristan Gingold2015-06-09 20:16:23 +0200
commite6d3f2d007196dbddad119520c530454ab5a33c9 (patch)
treef454874a59006d9c9075782fb5ffd4d00d4fe29e /testsuite/gna/bug15/phys.vhdl
parent051c628175b30d752db4d8e292b992c30364116f (diff)
downloadghdl-e6d3f2d007196dbddad119520c530454ab5a33c9.tar.gz
ghdl-e6d3f2d007196dbddad119520c530454ab5a33c9.tar.bz2
ghdl-e6d3f2d007196dbddad119520c530454ab5a33c9.zip
Testcase for crash due to physical fp literals.
Diffstat (limited to 'testsuite/gna/bug15/phys.vhdl')
-rw-r--r--testsuite/gna/bug15/phys.vhdl24
1 files changed, 24 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;