Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / gnat.dg / system_info1.adb
blobfedcc228f29d025977ca02e5cf71478710b2b7e5
1 -- A basic test initially intended to check that
2 -- System.Task_Info.Number_Of_Processors yields sensible results on
3 -- both 32bit and 64bit Windows. Additional configurations where the
4 -- feature was verified to work can opt-in.
6 -- { dg-do run { target *-*-linux* *-*-mingw* *-*-solaris2.* } }
8 with System.Multiprocessors;
9 with System.Task_Info;
11 procedure System_Info1 is
12 Ncpus : constant System.Multiprocessors.CPU :=
13 System.Multiprocessors.Number_Of_CPUS;
14 Nprocs : constant Integer :=
15 System.Task_Info.Number_Of_Processors;
17 use type System.Multiprocessors.CPU;
18 begin
19 if Nprocs <= 0 or else Nprocs > 1024 then
20 raise Program_Error;
21 end if;
22 if Ncpus <= 0 or else Ncpus > 1024 then
23 raise Program_Error;
24 end if;
25 if Nprocs /= Integer (Ncpus) then
26 raise Program_Error;
27 end if;
28 end;