summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2006-07-16 14:31:05 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2006-07-16 14:31:05 +0000
commit8ccaf1c3d45c2458aac4ea53802e5e3c1cb8111d (patch)
tree31b4477b0273cda78a13029da44c7a27c998faea /gcc/testsuite/gnat.dg
parent62426a9dcca7c4cdc545cb65936bbb3d24338506 (diff)
downloadgcc-8ccaf1c3d45c2458aac4ea53802e5e3c1cb8111d.tar.gz
* optabs.c (maybe_encapsulate_block): New function extracted from...
(emit_libcall_block): ...here. Invoke it on the block of insns to maybe emit REG_LIBCALL/REG_RETVAL notes around the block. (emit_no_conflict_block): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@115498 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gnat.dg')
-rw-r--r--gcc/testsuite/gnat.dg/assert.ads5
-rw-r--r--gcc/testsuite/gnat.dg/controlled_record.adb15
-rw-r--r--gcc/testsuite/gnat.dg/controlled_record.ads16
3 files changed, 36 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/assert.ads b/gcc/testsuite/gnat.dg/assert.ads
new file mode 100644
index 00000000000..81a912a8ad2
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/assert.ads
@@ -0,0 +1,5 @@
+package Assert is
+
+ procedure Assert (Condition : Boolean);
+
+end Assert;
diff --git a/gcc/testsuite/gnat.dg/controlled_record.adb b/gcc/testsuite/gnat.dg/controlled_record.adb
new file mode 100644
index 00000000000..89a9380b9d2
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/controlled_record.adb
@@ -0,0 +1,15 @@
+-- { 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;
diff --git a/gcc/testsuite/gnat.dg/controlled_record.ads b/gcc/testsuite/gnat.dg/controlled_record.ads
new file mode 100644
index 00000000000..71a57372c96
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/controlled_record.ads
@@ -0,0 +1,16 @@
+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_Record;