diff options
author | Tristan Gingold | 2014-01-19 02:24:46 +0100 |
---|---|---|
committer | Tristan Gingold | 2014-01-19 02:24:46 +0100 |
commit | e47227b318ac19fed2fb140614c70b30cb5329d7 (patch) | |
tree | a56c66f66ce02558d5f7458582359381a27080c7 | |
parent | f3db20a0780892ef7c8f12f1fa07d48b8c094423 (diff) | |
download | ghdl-e47227b318ac19fed2fb140614c70b30cb5329d7.tar.gz ghdl-e47227b318ac19fed2fb140614c70b30cb5329d7.tar.bz2 ghdl-e47227b318ac19fed2fb140614c70b30cb5329d7.zip |
Fix bug21513: expanded name with operator_symbol prefix.
-rw-r--r-- | parse.adb | 4 | ||||
-rw-r--r-- | testsuite/gna/bug21513/pb.vhdl | 17 | ||||
-rwxr-xr-x | testsuite/gna/bug21513/testsuite.sh | 10 |
3 files changed, 30 insertions, 1 deletions
@@ -4717,7 +4717,9 @@ package body Parse is if Flags.Vhdl_Std >= Vhdl_93c then Check_End_Name (Stmt); end if; - when Tok_Identifier => -- | tok_left_paren + when Tok_Identifier + | Tok_String => + -- String for an expanded name with operator_symbol prefix. Stmt := Parse_Sequential_Assignment_Statement (Parse_Name); when Tok_Left_Paren => declare diff --git a/testsuite/gna/bug21513/pb.vhdl b/testsuite/gna/bug21513/pb.vhdl new file mode 100644 index 0000000..5b63cf1 --- /dev/null +++ b/testsuite/gna/bug21513/pb.vhdl @@ -0,0 +1,17 @@ +entity pb is +end pb; + +architecture behav of pb is + type t is record + v : integer; + end record; + + function "-" (a, b : t) return t is + variable v : integer; + begin + "-".v := a.v; + v := "-".b.v; + return b; + end "-"; +begin +end; diff --git a/testsuite/gna/bug21513/testsuite.sh b/testsuite/gna/bug21513/testsuite.sh new file mode 100755 index 0000000..ceb537d --- /dev/null +++ b/testsuite/gna/bug21513/testsuite.sh @@ -0,0 +1,10 @@ +#! /bin/sh + +. ../../testenv.sh + + +analyze pb.vhdl + +clean + +echo "Test successful" |