OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gnat.dg/] [overflow_sum2.adb] - Blame information for rev 378

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 304 jeremybenn
-- { dg-do compile }
2
-- { dg-options "-gnato" }
3
 
4
with Namet; use Namet;
5
 
6
function Overflow_Sum2 return Hash_Index_Type is
7
 
8
  Even_Name_Len : Integer;
9
 
10
begin
11
 
12
  if Name_Len > 12 then
13
    Even_Name_Len := (Name_Len) / 2 * 2;
14
 
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;
29
 
30
  return 0;
31
 
32
end;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.