This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[Ada] Fix regression on ACATS C3400%G


Fix regression on ACATS C3400%G. Applied for Ed.

  -Geert

2001-10-11  Ed Schonberg <schonber@gnat.com>

	* sem_eval.adb (Compare_Fixup): get the bounds of a String_Literal 
	properly. Fixes regression on ACATS C34005G.

*** sem_eval.adb	2001/09/18 20:03:12	1.291
--- sem_eval.adb	2001/09/25 15:04:44	1.292
***************
*** 450,455 ****
--- 450,466 ----
                 return N;
              end if;
  
+             if Ekind (Xtyp) = E_String_Literal_Subtype then
+                if Attribute_Name (N) = Name_First then
+                   return String_Literal_Low_Bound (Xtyp);
+ 
+                else         -- Attribute_Name (N) = Name_Last
+                   return Make_Integer_Literal (Sloc (N),
+                     Intval => Intval (String_Literal_Low_Bound (Xtyp))
+                        + String_Literal_Length (Xtyp));
+                end if;
+             end if;
+ 
              --  Find correct index type
  
              Indx := First_Index (Xtyp);



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]