From c7182c8329d493b3a953521fff55e3c635e5cf00 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Fri, 26 Aug 2016 05:01:57 +0200 Subject: Add testcase for issue #143 --- testsuite/gna/issue143/repro.vhdl | 8 ++++++++ testsuite/gna/issue143/testsuite.sh | 10 +++++++++ testsuite/gna/issue143/universal_conversion_tb.vhd | 24 ++++++++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 testsuite/gna/issue143/repro.vhdl create mode 100755 testsuite/gna/issue143/testsuite.sh create mode 100644 testsuite/gna/issue143/universal_conversion_tb.vhd diff --git a/testsuite/gna/issue143/repro.vhdl b/testsuite/gna/issue143/repro.vhdl new file mode 100644 index 000000000..c851c0df1 --- /dev/null +++ b/testsuite/gna/issue143/repro.vhdl @@ -0,0 +1,8 @@ +entity e is +end; + +architecture a of e is + constant a : real := 1000.0 / 100; + constant b : time := 1000.0 / 100 * 10 ps; +begin +end; diff --git a/testsuite/gna/issue143/testsuite.sh b/testsuite/gna/issue143/testsuite.sh new file mode 100755 index 000000000..819714d59 --- /dev/null +++ b/testsuite/gna/issue143/testsuite.sh @@ -0,0 +1,10 @@ +#! /bin/sh + +. ../../testenv.sh + +analyze_failure universal_conversion_tb.vhd +analyze_failure repro.vhdl + +clean + +echo "Test successful" diff --git a/testsuite/gna/issue143/universal_conversion_tb.vhd b/testsuite/gna/issue143/universal_conversion_tb.vhd new file mode 100644 index 000000000..ba8915f4e --- /dev/null +++ b/testsuite/gna/issue143/universal_conversion_tb.vhd @@ -0,0 +1,24 @@ +use std.textio.all; + +library ieee; +use ieee.std_logic_1164.all; + +entity universal_conversion_tb is +end universal_conversion_tb; + +architecture test of universal_conversion_tb is + + constant TEST_VAL : time := 1000.0/100 * 1 ns; + +begin + + process + variable l : line; + begin + write(l, string'("TEST_VAL = ")); + write(l, TEST_VAL); + writeline(output, l); + wait; + end process; + +end; -- cgit v1.2.3