diff options
Diffstat (limited to 'testsuite/gna/issue2148/e.vhdl')
-rw-r--r-- | testsuite/gna/issue2148/e.vhdl | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/testsuite/gna/issue2148/e.vhdl b/testsuite/gna/issue2148/e.vhdl new file mode 100644 index 000000000..52fd61067 --- /dev/null +++ b/testsuite/gna/issue2148/e.vhdl @@ -0,0 +1,35 @@ +entity e is end; + +architecture a of e is + + -------------------------------------------------------------------------------- + -- Variable is reported as unused, but it is used for its 'image attribute + -------------------------------------------------------------------------------- + procedure p is + variable a : integer; + begin + report integer'image(a); + end; + + + -------------------------------------------------------------------------------- + -- Variable b is reported as unused, but it is the return value of function f. + -------------------------------------------------------------------------------- + type integer_vector_93 is array (natural range <>) of integer; + function f return integer_vector_93 is + variable b : integer; + begin + return (0 => b); + end; +begin + + + -- This code can be ignored. It is only to suppress non-spurious warnings + -- about subprograms p and f being unused + process + constant c : integer_vector_93 := f; + begin + p; + wait; + end process; +end; |