This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Ada] Fix regression on ACATS C3400%G
- To: gcc-patches at gcc dot gnu dot org
- Subject: [Ada] Fix regression on ACATS C3400%G
- From: Geert Bosch <bosch at gnat dot com>
- Date: Thu, 11 Oct 2001 20:32:45 -0400 (EDT)
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);