* snames.ads-tmpl (Name_Ivdep): New pragma-related name.
[official-gcc.git] / gcc / testsuite / gnat.dg / overflow_sum2.adb
blob8374eee13227e1a4b2e11470e2594de819dd0f2d
1 -- { dg-do compile }
2 -- { dg-options "-gnato" }
4 with Namet; use Namet;
6 function Overflow_Sum2 return Hash_Index_Type is
8 Even_Name_Len : Integer;
10 begin
12 if Name_Len > 12 then
13 Even_Name_Len := (Name_Len) / 2 * 2;
15 return ((((((((((((
16 Character'Pos (Name_Buffer (01))) * 2 +
17 Character'Pos (Name_Buffer (Even_Name_Len - 10))) * 2 +
18 Character'Pos (Name_Buffer (03))) * 2 +
19 Character'Pos (Name_Buffer (Even_Name_Len - 08))) * 2 +
20 Character'Pos (Name_Buffer (05))) * 2 +
21 Character'Pos (Name_Buffer (Even_Name_Len - 06))) * 2 +
22 Character'Pos (Name_Buffer (07))) * 2 +
23 Character'Pos (Name_Buffer (Even_Name_Len - 04))) * 2 +
24 Character'Pos (Name_Buffer (09))) * 2 +
25 Character'Pos (Name_Buffer (Even_Name_Len - 02))) * 2 +
26 Character'Pos (Name_Buffer (11))) * 2 +
27 Character'Pos (Name_Buffer (Even_Name_Len))) mod Hash_Num;
28 end if;
30 return 0;
32 end;