OSDN Git Service

2006-02-13 Robert Dewar <dewar@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Feb 2006 09:41:22 +0000 (09:41 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Feb 2006 09:41:22 +0000 (09:41 +0000)
* g-spipat.adb (Image, case PC_Assign_Imm and case PC_Assign_OnM):
These two cases were generating incorrect output, and if this unit
was built with checks on, generated a discriminant mismatch constraint
error.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111076 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/g-spipat.adb

index ab6bdd5..8a5375d 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---                     Copyright (C) 1998-2005, AdaCore                     --
+--                     Copyright (C) 1998-2006, AdaCore                     --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -2484,11 +2484,11 @@ package body GNAT.Spitbol.Patterns is
 
             when PC_Assign_Imm =>
                Delete_Ampersand;
-               Append (Result, "* " & Str_VP (Refs (E.Index - 1).VP));
+               Append (Result, "* " & Str_VP (Refs (E.Index).VP));
 
             when PC_Assign_OnM =>
                Delete_Ampersand;
-               Append (Result, "** " & Str_VP (Refs (E.Index - 1).VP));
+               Append (Result, "** " & Str_VP (Refs (E.Index).VP));
 
             when PC_Any_CH =>
                Append (Result, "Any ('" & E.Char & "')");