file_text stringlengths 1 2.1M ⌀ | language stringclasses 416
values | file_name stringlengths 1 185 ⌀ |
|---|---|---|
package Concat1_Pkg is
function Ident (I : Integer) return Integer;
end Concat1_Pkg;
| Ada | concat1_pkg_1.ads |
-- { dg-do compile }
-- { dg-options "-O" }
with Text_IO; use Text_IO;
package body Concat2 is
function Get_Param return String is
begin
return "";
end;
procedure Browse is
Mode : constant String := Get_Param;
Mode_Param : constant String := "MODE=" & Mode;
begin
Put... | Ada | concat2.adb |
package Concat2 is
procedure Browse;
end Concat2;
| Ada | concat2.ads |
-- { dg-do run }
-- { dg-options "-g -O0 -gnata" }
procedure Concat3 is
procedure Show_Bug (S : in String)
is
Str : constant String := S & "-" with Alignment => 4;
begin
null;
end Show_Bug;
begin
Show_Bug ("BUG");
end Concat3; | Ada | concat3.adb |
-- { dg-do compile }
with Ada.Text_IO; use Ada.Text_IO;
procedure Concat4 (X : Integer) is
Ximg : constant String := Integer'Image (X);
begin
if X > 0 then
Put_Line (Ximg & " is Positive");
elsif X < 0 then
Put_Line (Ximg & " is Negative");
else
Put_Line (Ximg & " is Null");
end if;
e... | Ada | concat4.adb |
-- { dg-do run }
-- { dg-options "-O" }
with Concat5_Pkg1; use Concat5_Pkg1;
procedure Concat5 is
begin
Scan ("-RTS=none");
end;
| Ada | concat5.adb |
with Concat5_Pkg2; use Concat5_Pkg2;
package body Concat5_Pkg1 is
procedure Make_Failed (S : String);
pragma No_Inline (Make_Failed);
procedure Make_Failed (S : String) is
begin
Compare (S);
end;
procedure Scan (S : String) is
begin
Make_Failed ("option " & S & " should start with '--'");
en... | Ada | concat5_pkg1.adb |
package Concat5_Pkg1 is
procedure Scan (S : String);
end Concat5_Pkg1;
| Ada | concat5_pkg1.ads |
package body Concat5_Pkg2 is
procedure Compare (S : String) is
begin
if S /= "option -RTS=none should start with '--'" then
raise Program_Error;
end if;
end;
end Concat5_Pkg2;
| Ada | concat5_pkg2.adb |
package Concat5_Pkg2 is
procedure Compare (S : String);
end Concat5_Pkg2;
| Ada | concat5_pkg2.ads |
-- { dg-do run }
procedure Concat_Length is
type Byte is mod 256;
for Byte'Size use 8;
type Block is array(Byte range <>) of Integer;
C0: Block(1..7) := (others => 0);
C1: Block(8..255) := (others => 0);
C2: Block := C0 & C1;
begin
if C2'Length /= 255 then
raise Program_Error;
end if;
end;
| Ada | concat_length.adb |
-- Copyright 2022-2023 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- ... | Ada | concrete.adb |
-- Copyright 2022-2023 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- ... | Ada | concrete.ads |
-- { dg-do compile }
-- { dg-options "-gnat12" }
function Cond_Expr1 (Dir : in String) return String is
begin
return (if Dir (Dir'Last) = '\' then Dir else Dir & '\');
end;
| Ada | cond_expr1.adb |
-- { dg-do compile }
-- { dg-options "-gnat12 -gnato" }
package Cond_Expr1 is
function Tail (S : String) return String is
(if S'Last <= S'First then "" else S (S'First + 1 .. S'Last));
end Cond_Expr1;
| Ada | cond_expr1.ads |
-- { dg-do compile }
-- { dg-options "-gnat12" }
package body Cond_Expr2 is
function F (X : integer) return String is
begin
return (if X > 0 then "positive" else "negative");
end;
end Cond_Expr2;
| Ada | cond_expr2.adb |
package Cond_Expr2 is
function F (X : integer) return String;
end Cond_Expr2;
| Ada | cond_expr2.ads |
-- Copyright 2013-2023 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- ... | Ada | const.ads |
-- Copyright 2013-2023 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- ... | Ada | const_1.ads |
-- { dg-do compile }
procedure Constant1 is
Def_Const : constant Integer;
pragma Import (Ada, Def_Const);
begin
null;
end;
| Ada | constant1.adb |
-- { dg-do compile }
with Constant1_Pkg;
package Constant1 is
type Timer_Id_T is new Constant1_Pkg.Timer_Id_T with null record;
type Timer_Op_T (Pending : Boolean := False) is
record
case Pending is
when True =>
Timer_Id : Timer_Id_T;
when False =>
null;
... | Ada | constant1.ads |
package Constant1_Pkg is
type Id_T is mod Natural'Last + 1;
type Timer_Id_T is tagged record
Id : Id_T := Id_T'Last;
end record;
Null_Timer_Id : constant Timer_Id_T := (Id => Id_T'Last - 1);
end Constant1_Pkg;
| Ada | constant1_pkg.ads |
-- { dg-do run }
-- { dg-options "-gnatVa" }
with Constant2_Pkg1; use Constant2_Pkg1;
procedure Constant2 is
begin
if Val then
raise Program_Error;
end if;
end;
| Ada | constant2.adb |
with Constant2_Pkg2; use Constant2_Pkg2;
package Constant2_Pkg1 is
Val : constant Boolean := F1 and then F2;
end Constant2_Pkg1;
| Ada | constant2_pkg1.ads |
package body Constant2_Pkg2 is
function F1 return Boolean is
begin
return False;
end;
function F2 return Boolean is
begin
return False;
end;
end Constant2_Pkg2;
| Ada | constant2_pkg2.adb |
package Constant2_Pkg2 is
function F1 return Boolean;
function F2 return Boolean;
end Constant2_Pkg2;
| Ada | constant2_pkg2.ads |
-- { dg-do compile }
-- { dg-options "-O" }
with System.Machine_code; use System.Machine_code;
procedure Constant3 is
c : Integer := -1;
r : Integer;
procedure Conv (res : out Integer; v : Integer) is
v1 : constant Integer := v;
begin
Asm ("", Integer'Asm_output ("=m", res), Integer'Asm_input("m", v... | Ada | constant3.adb |
-- { dg-do link }
-- { dg-options "-gnat12" }
with Constant4_Pkg; use Constant4_Pkg;
procedure Constant4 is
Sum : Counter := 0;
begin
for Count of Steals loop
Sum := Sum + Count;
end loop;
end;
| Ada | constant4.adb |
with Ada.Command_Line; use Ada.Command_Line;
with System.Multiprocessors; use System.Multiprocessors;
package Constant4_Pkg is
Max_CPUs : constant CPU := (if Argument_Count < 2 then Number_Of_CPUs
else CPU'Value (Argument (2)));
subtype Worker_Id is CPU range 1 .. Max_CPUs;... | Ada | constant4_pkg.ads |
-- { dg-do compile }
package constructor is
type R (Name_Length : Natural) is record
Name : Wide_String (1..Name_Length);
Multiple : Boolean;
end record;
Null_Params : constant R :=
(Name_Length => 0,
Name => "",
Multiple => False);
end;
| Ada | constructor.ads |
-- { dg-do compile }
-- { dg-options "-Wall -O2" }
package body Containers1 is
procedure Dummy is null;
end Containers1;
| Ada | containers1.adb |
with Ada.Containers.Bounded_Ordered_Sets; use Ada.Containers;
package Containers1 is
pragma Suppress (All_Checks);
package Sets is new Bounded_Ordered_Sets (Boolean);
procedure Dummy;
end Containers1; | Ada | containers1.ads |
-- { dg-do run }
-- { dg-options "-gnata" }
with Ada.Strings.Hash;
with Ada.Containers.Hashed_Sets;
with Ada.Containers.Hashed_Maps;
with Ada.Containers.Indefinite_Hashed_Sets;
with Ada.Containers.Indefinite_Hashed_Maps;
procedure Containers2 is
-- Check that Cursors of the hashed containers follow the correct
... | Ada | containers2.adb |
-- { dg-do compile }
-- { dg-options "-gnatd.F -gnatwa" }
with Ada.Dispatching;
procedure Contract1 with SPARK_Mode is
function Foo return Boolean is
begin
Ada.Dispatching.Yield;
return True;
end Foo;
Dummy : constant Integer := 0;
begin
if Foo and then True then
raise Program_Er... | Ada | contract1.adb |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... | Ada | contracts.adb |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... | Ada | contracts.ads |
with Ada.Finalization; use Ada.Finalization;
package controlled1 is
type Test is new Controlled with null record;
procedure Add_Test (T : access Test'Class);
type Test_Case1 is new Test with null record;
type Test_Suite is new Test with null record;
type Test_Case is new Test_Case1 with record
... | Ada | controlled1.ads |
-- { dg-do compile }
with Ada.Finalization;
with Controlled1_Pkg; use Controlled1_Pkg;
package Controlled1 is
type Collection is new Ada.Finalization.Controlled with null record;
type Object_Kind_Type is (One, Two);
type Byte_Array is array (Natural range <>) of Integer;
type Bounded_Byte_Array_Type ... | Ada | controlled1_1.ads |
-- { dg-excess-errors "no code generated" }
package Controlled1_Pkg is
function Value return Natural;
end Controlled1_Pkg;
| Ada | controlled1_pkg.ads |
-- { dg-do compile }
-- { dg-options "-gnatws" }
with controlled1; use controlled1;
package body controlled2 is
procedure Test_Suite is
begin
Add_Test
(new Test_Case'(Test_Case1 with Link_Under_Test => 300));
end Test_Suite;
end controlled2;
| Ada | controlled2.adb |
with controlled1; use controlled1;
package controlled2 is
procedure Test_Suite;
end controlled2;
| Ada | controlled2.ads |
with Ada.Finalization; use Ada.Finalization;
package controlled3 is
type Test is new Controlled with null record;
procedure Add_Test (T : access Test'Class);
type Test_Case1 is new Test with null record;
type Test_Suite is new Test with null record;
type Test_Case is new Test_Case1 with record
... | Ada | controlled3.ads |
-- { dg-do compile }
-- { dg-options "-gnatws" }
package body controlled4 is
procedure Test_Suite is
begin
Add_Test
(new Test_Case'(Test_Case1 with Link_Under_Test => 300));
end Test_Suite;
end;
| Ada | controlled4.adb |
with controlled3; use controlled3;
package controlled4 is
procedure Test_Suite;
end;
| Ada | controlled4.ads |
-- { dg-do run }
with Controlled5_Pkg; use Controlled5_Pkg;
procedure Controlled5 is
V : Root'Class := Dummy (300);
begin
null;
end;
| Ada | controlled5.adb |
with Ada.Tags;
package body Controlled5_Pkg is
type Child is new Root with null record;
function Dummy (I : Integer) return Root'Class is
A1 : T_Root_Class := new Child;
My_Var : Root'Class := A1.all;
begin
if I = 0 then
return My_Var;
else
return Dummy (I - 1);
... | Ada | controlled5_pkg.adb |
with Ada.Finalization; use Ada.Finalization;
package Controlled5_Pkg is
type Root is tagged private;
type Inner is new Ada.Finalization.Controlled with null record;
type T_Root_Class is access all Root'Class;
function Dummy (I : Integer) return Root'Class;
private
type Root is tagged record
... | Ada | controlled5_pkg.ads |
-- { dg-do compile }
-- { dg-options "-O -gnatn" }
with Ada.Text_IO; use Ada.Text_IO;
with Controlled6_Pkg;
with Controlled6_Pkg.Iterators;
procedure Controlled6 is
type String_Access is access String;
package My_Q is new Controlled6_Pkg (String_Access);
package My_Iterators is new My_Q.Iterators (0);
u... | Ada | controlled6.adb |
package body Controlled6_Pkg.Iterators is
function Find return Iterator_Type is
Iterator : Iterator_Type;
begin
return Iterator;
end Find;
function Current (Iterator : in Iterator_Type) return T is begin
return Iterator.Current.Item;
end Current;
procedure Find_Next (Iterator : in... | Ada | controlled6_pkg-iterators.adb |
with Ada.Finalization;
generic
I : Integer;
package Controlled6_Pkg.Iterators is
type Iterator_Type is new Ada.Finalization.Controlled with record
Current : Node_Access_Type;
end record;
function Find return Iterator_Type;
function Current (Iterator : in Iterator_Type) return T;
pragma Inl... | Ada | controlled6_pkg-iterators.ads |
with Ada.Finalization;
generic
type T is private;
package Controlled6_Pkg is
type Node_Type is record
Item : T;
end record;
type Node_Access_Type is access Node_Type;
end Controlled6_Pkg;
| Ada | controlled6_pkg.ads |
-- PR ada/53766
-- Reported by Duncan Sands <baldrick@gcc.gnu.org>
-- { dg-do compile }
-- { dg-options "-gnatp" }
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
package body Controlled7 is
procedure Proc (Offset : Storage_Offset) is
begin
if Offset + Unbounded_String'Max_Size_In_Storage_Element... | Ada | controlled7.adb |
with System.Storage_Elements; use System.Storage_Elements;
package Controlled7 is
procedure Proc (Offset : Storage_Offset);
end Controlled7;
| Ada | controlled7.ads |
-- { dg-do compile }
with Ada.Finalization; use Ada.Finalization;
procedure Controlled8
(Int_Input : Integer;
Str_Input : String)
is
type Ctrl is new Controlled with null record;
type Integer_Ptr is access all Integer;
type String_Ptr is access all String;
function Func (Val : Integer) return Ctrl... | Ada | controlled8.adb |
-- { dg-do compile }
-- { dg-options "-O2" }
with Ada.Text_IO; use Ada.Text_IO;
with Assert;
package body Controlled_Record is
procedure Assert_Invariants (PA : Point_T) is
PB : Point_T;
begin
Assert.Assert (PB.Pos = PA.Pos);
end;
end Controlled_Record;
| Ada | controlled_record.adb |
with Ada.Finalization;
package Controlled_Record is
type Point_T is limited private;
procedure Assert_Invariants (PA : Point_T);
private
type Coords_T is array (1 .. 2) of Natural;
type Point_T is new Ada.Finalization.Controlled with record
Pos : Coords_T := (0, 0);
end record;
end Controlled... | Ada | controlled_record.ads |
-- { dg-do compile }
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
package Controller is
type Iface is interface;
type Thing is tagged record
Name : Unbounded_String;
end record;
type Object is abstract new Thing and Iface with private;
private
type Object is abstract new Thing and Ifac... | Ada | controller.ads |
-- { dg-do run }
with System; use System;
with Ada.Text_IO; use Ada.Text_IO;
procedure Conv1 is
type Short is mod 2**16;
type R_L is record
S : Short;
C : Character;
end record;
for R_L'Bit_Order use Low_Order_First;
for R_L'Scalar_Storage_Order use Low_Order_First;
for R_L use record
... | Ada | conv1.adb |
-- { dg-do run }
-- { dg-options "-gnatws" }
with discr3; use discr3;
with Text_IO; use Text_IO;
procedure Conv_Bug is
begin
begin
V2 := S2 (V1);
exception
when Constraint_Error => null;
when others => Put_Line ("Wrong Exception raised");
end;
begin
V2 := S2(V1(V1'Range));
... | Ada | conv_bug.adb |
-- PR middle-end/36575
-- reporter: Laurent Guerby <laurent@guerby.net>
-- { dg-do run }
procedure Conv_Decimal is
type Unsigned_Over_8 is mod 2**8+2;
type Signed_Over_8 is range -200 .. 200;
procedure Assert(Truth: Boolean) is
begin
if not Truth then
raise Program_Error;
end if;
end;
type... | Ada | conv_decimal.adb |
-- { dg-do compile }
-- { dg-options "-gnatws" }
procedure Conv_Integer is
S : constant := Integer'Size;
type Regoff_T is range -1 .. 2 ** (S-1);
for Regoff_T'Size use S;
B : Integer;
C : Regoff_T;
begin
B := Integer (C);
end;
| Ada | conv_integer.adb |
-- { dg-do run }
with Interfaces; use Interfaces;
procedure Conv_Real is
Small : constant := 10.0**(-9);
type Time_Type is delta Small range -2**63 * Small .. (2**63-1) * Small;
for Time_Type'Small use Small;
for Time_Type'Size use 64;
procedure Cache (Seconds_Per_GDS_Cycle : in Time_Type) is
Cyc... | Ada | conv_real.adb |
package Corr_Discr is
type Base (T1 : Boolean := True; T2 : Boolean := False)
is null record;
for Base use record
T1 at 0 range 0 .. 0;
T2 at 0 range 1 .. 1;
end record;
type Deriv (D : Boolean := False) is new Base (T1 => True, T2 => D);
end Corr_Discr;
| Ada | corr_discr.ads |
-- { dg-do compile }
-- { dg-options "-ftest-coverage" }
package Coverage1 is
type Rec is record
I : Integer := 0;
end record;
end Coverage1;
| Ada | coverage1.ads |
-- { dg-do compile }
package cpp1 is
type Root_Interface is interface;
type Typ is new Root_Interface with record
TOTO : Integer;
pragma CPP_Vtable (TOTO);
end record;
end cpp1;
| Ada | cpp1.ads |
-- { dg-do compile }
package CPP_Assignment is
type T is tagged record
Data : Integer := 0;
end record;
pragma Convention (CPP, T);
Obj1 : T := (Data => 1); Obj2 : T'Class := Obj1;
end;
| Ada | cpp_assignment.ads |
-- { dg-do compile }
with Interfaces.C; use Interfaces.C;
with Cpp_Constructor_FP;
with Cpp_Constructor_Useit;
procedure Cpp_Constructor is
F : Cpp_Constructor_FP.Class :=
Cpp_Constructor_FP.Constructor (Cpp_Constructor_Useit.My_Fn'Access);
begin
null;
end Cpp_Constructor;
| Ada | cpp_constructor.adb |
-- { dg-do compile }
procedure CPP_Constructor2 is
package P is
type X is tagged limited record
A, B, C, D : Integer;
end record;
pragma Import (Cpp, X);
procedure F1 (V : X);
pragma Import (Cpp, F1);
function F2 return X; -- { dg-error "C\\+\\+ constructor must hav... | Ada | cpp_constructor2.adb |
with Interfaces.C; use Interfaces.C;
package Cpp_Constructor_FP is
type Class is limited record null; end record
with Convention => Cpp, Import;
function Constructor
(Fn : access function (Val : int) return int) return Class;
pragma Cpp_Constructor (Constructor, External_Name => "foo");
end Cpp_Const... | Ada | cpp_constructor_fp.ads |
with Interfaces.C; use Interfaces.C;
package Cpp_Constructor_Useit is
function My_Fn (Val : int) return int
with Convention => Cpp;
function My_Fn (Val : int) return int is (Val + 1);
end Cpp_Constructor_Useit;
| Ada | cpp_constructor_useit.ads |
-- Copyright 2017-2023 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- ... | Ada | crash.adb |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... | Ada | csets.adb |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... | Ada | csets.ads |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... | Ada | cstand.adb |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... | Ada | cstand.ads |
-- { dg-do run }
-- { dg-options "-gnatws" }
with Ada.Exceptions;
with Ada.Text_IO;
with Ada.Task_Identification;
procedure Curr_Task is
use Ada.Task_Identification;
-- Simple semaphore
protected Semaphore is
entry Lock;
procedure Unlock;
private
TID : Task_Id := Null_Task_Id;... | Ada | curr_task.adb |
-- CZ1101A.ADA
--
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlim... | Ada | cz1101a.ada |
-- CZ1102A.ADA
--
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimi... | Ada | cz1102a.ada |
-- CZ1103A.ADA
--
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimi... | Ada | cz1103a.ada |
-- D4A002A.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimit... | Ada | d4a002a.ada |
-- D4A002B.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimit... | Ada | d4a002b.ada |
-- D4A004A.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimit... | Ada | d4a004a.ada |
-- D4A004B.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimit... | Ada | d4a004b.ada |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... | Ada | debug.adb |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... | Ada | debug.ads |
-- { dg-do compile }
-- { dg-skip-if "No Dwarf" { { hppa*-*-hpux* } && { ! lp64 } } }
-- { dg-options "-cargs -O0 -g -dA -fgnat-encodings=minimal -margs" }
package Debug1 is
type Index_T is new Positive range 1 .. 128;
type Array_Type is array (Index_T range <>) of Integer;
type Record_Type (N : Index_T :=... | Ada | debug1.ads |
-- PR debug/80321
-- { dg-do compile }
-- { dg-options "-O2 -g" }
with Debug10_Pkg; use Debug10_Pkg;
procedure Debug10 (T : Entity_Id) is
procedure Inner (E : Entity_Id);
pragma Inline (Inner);
procedure Inner (E : Entity_Id) is
begin
if E /= Empty
and then not Nodes (E + 3).Flag16
... | Ada | debug10.adb |
with Unchecked_Conversion;
package Debug10_Pkg is
type Node_Id is range 0 .. 99_999_999;
Empty : constant Node_Id := 0;
subtype Entity_Id is Node_Id;
type Union_Id is new Integer;
function My_Is_Entity_Name (N : Node_Id) return Boolean;
function My_Scalar_Range (Id : Entity_Id) return Node_Id;
... | Ada | debug10_pkg.ads |
-- { dg-do compile }
-- { dg-skip-if "No Dwarf" { { hppa*-*-hpux* } && { ! lp64 } } }
-- { dg-options "-cargs -O0 -g -dA -fgnat-encodings=minimal -margs" }
--
-- This testcase checks that in the DWARF description of the variant type
-- below, the C discriminant is properly described as unsigned, hence the 0x5a
-- ('Z')... | Ada | debug11.adb |
-- { dg-options "-cargs -g -dA -margs" }
-- { dg-final { scan-assembler "local_imported_func" } }
-- { dg-final { scan-assembler "local_imported_var" } }
-- { dg-final { scan-assembler "global_imported_func" } }
-- { dg-final { scan-assembler "global_imported_var" } }
-- { dg-final { scan-assembler-not "foreign_i... | Ada | debug11_pkg.adb |
package Debug11_Pkg is
Global_Imported_Var : Integer;
pragma Import (C, Global_Imported_Var, "imported_var");
function Global_Imported_Func return Integer;
pragma Import (C, Global_Imported_Func, "imported_func");
procedure Dummy;
end Debug11_Pkg;
| Ada | debug11_pkg.ads |
package Debug11_Pkg2 is
Foreign_Imported_Var : Integer;
pragma Import (C, Foreign_Imported_Var, "imported_var");
function Foreign_Imported_Func return Integer;
pragma Import (C, Foreign_Imported_Func, "imported_func");
end Debug11_Pkg2;
| Ada | debug11_pkg2.ads |
-- { dg-do compile }
-- { dg-skip-if "No Dwarf" { { hppa*-*-hpux* } && { ! lp64 } } }
-- { dg-options "-cargs -gdwarf-4 -fdebug-types-section -dA -margs" }
-- { dg-final { scan-assembler-times "DW_AT_location" 4 } }
package body Debug12 is
function Get_A2 return Boolean is
begin
return A2;
end Get_A... | Ada | debug12.adb |
package Debug12 is
type Bit_Array is array (Positive range <>) of Boolean
with Pack;
A : Bit_Array := (1 .. 10 => False);
A2 : Boolean renames A (2);
function Get_A2 return Boolean;
end Debug12;
| Ada | debug12.ads |
-- { dg-do compile }
-- { dg-options "-O2 -g" }
package body Debug13 is
procedure Compile (P : Natural)
is
Max_Pos : constant Natural := P;
type Position_Set is array (1 .. Max_Pos) of Boolean;
Empty : constant Position_Set := (others => False);
type Position_Set_Array is array (1 .. ... | Ada | debug13.adb |
package Debug13 is
procedure Compile (P : Natural);
end Debug13;
| Ada | debug13.ads |
-- { dg-do compile }
-- { dg-options "-g -fgnat-encodings=minimal" }
procedure Debug14 is
type Db_Kind_T is (Raw, Relational, Object);
type Db_Model_T (Kind : Db_Kind_T) is
record
case Kind is
when Raw =>
Fs_Type : Integer;
when Relational | Object =>
Vendor_Id : ... | Ada | debug14.adb |
-- { dg-do compile }
-- { dg-skip-if "No Dwarf" { { hppa*-*-hpux* } && { ! lp64 } } }
-- { dg-options "-cargs -O0 -g -dA -fgnat-encodings=minimal -margs" }
procedure Debug16 is
type Number_T (Exists : Boolean := False) is
record
case Exists is
when True =>
Value : Natural ... | Ada | debug16.adb |
-- { dg-do compile }
-- { dg-skip-if "No Dwarf" { { hppa*-*-hpux* } && { ! lp64 } } }
-- { dg-options "-cargs -O0 -g -dA -fgnat-encodings=minimal -margs" }
pragma No_Component_Reordering;
procedure Debug17 (Number_Of_Bits : Natural) is
type Bitinfos_T is array (Natural range 1 .. Number_Of_Bits) of Float;
typ... | Ada | debug17.adb |
-- { dg-do compile }
-- { dg-skip-if "No Dwarf" { { hppa*-*-hpux* } && { ! lp64 } } }
-- { dg-options "-cargs -O0 -g -dA -fgnat-encodings=minimal -margs" }
procedure Debug18 is
procedure Check (Size : Integer) is
type Bit_Array_Type is array (1 .. Size) of boolean;
pragma Pack (Bit_Array_Type);
... | Ada | debug18.adb |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.