From f5e3ef10265440a3efc95281fef295cba6aab8a9 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sat, 27 Feb 2021 17:20:56 +0100 Subject: testsuite/synth: add a test for #1665 --- testsuite/synth/issue1665/test.vhdl | 16 ++++++++++++++++ testsuite/synth/issue1665/testsuite.sh | 8 ++++++++ 2 files changed, 24 insertions(+) create mode 100644 testsuite/synth/issue1665/test.vhdl create mode 100755 testsuite/synth/issue1665/testsuite.sh (limited to 'testsuite/synth') diff --git a/testsuite/synth/issue1665/test.vhdl b/testsuite/synth/issue1665/test.vhdl new file mode 100644 index 000000000..3591e23c7 --- /dev/null +++ b/testsuite/synth/issue1665/test.vhdl @@ -0,0 +1,16 @@ +library ieee; +use ieee.fixed_pkg.all; +use ieee.math_real.all; + +entity test is +end entity test; + +architecture synthesis of test is + constant test1 : real := (2.0**6); -- works + constant test2 : real := (2.0**6.0); -- unhandled predefined IEEE operator "**" + constant test3 : real := arctan(2.0); -- unhandled call to ieee function "arctan" + signal a : sfixed(7 downto 0); +begin +a <= to_sfixed(test2, a); + assert test2 = 64.0 severity failure; +end architecture synthesis; diff --git a/testsuite/synth/issue1665/testsuite.sh b/testsuite/synth/issue1665/testsuite.sh new file mode 100755 index 000000000..1bd00c114 --- /dev/null +++ b/testsuite/synth/issue1665/testsuite.sh @@ -0,0 +1,8 @@ +#! /bin/sh + +. ../../testenv.sh + +GHDL_STD_FLAGS=--std=08 +synth_only test + +echo "Test successful" -- cgit v1.2.3