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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gnat.dg/] [rep_clause5.adb] - Blame information for rev 696

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 696 jeremybenn
-- { dg-do compile }
2
-- { dg-options "-O" }
3
 
4
package body Rep_Clause5 is
5
 
6
    function To_LNumber(S : String) return LNumber_Type is
7
        V :  VString;
8
        LV : Long_Type;
9
        LN : LNumber_Type;
10
    begin
11
        LV := To_Long(V, 10);
12
        LN := LNumber_Type(LV);
13
        return LN;
14
    end;
15
 
16
    procedure Merge_Numbered(LNodes : in out LNodes_Ptr) is
17
        T1  : Token_Type;
18
        LNO : LNumber_Type;
19
    begin
20
        for X in LNodes.all'Range loop
21
            T1 := LNodes(X).Line(0);
22
            if T1.Token /= LEX_LF then
23
                declare
24
                    S : String := Element(T1.SID);
25
                begin
26
                    begin
27
                        LNO := To_LNumber(S);
28
                    exception
29
                        when Bad_Number =>
30
                            LNO := 0;
31
                        when Too_Large =>
32
                            LNO := 0;
33
                    end;
34
                end;
35
            end if;
36
        end loop;
37
    end;
38
 
39
end Rep_Clause5;

powered by: WebSVN 2.1.0

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