summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--parse.adb4
-rw-r--r--testsuite/gna/bug21513/pb.vhdl17
-rwxr-xr-xtestsuite/gna/bug21513/testsuite.sh10
3 files changed, 30 insertions, 1 deletions
diff --git a/parse.adb b/parse.adb
index eadf4c4..b1ddc74 100644
--- a/parse.adb
+++ b/parse.adb
@@ -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"