summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-12 10:59:38 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-12 10:59:38 +0000
commitcfbbebf3da74eacec06d7f97c22a2f45193e58ac (patch)
treedbc1e0c1a27d3848e0e0979f31d510f914bb8efd /gcc/testsuite/gnat.dg
parent757a32376af48f84c11c3317e286061ab70abcc6 (diff)
downloadgcc-cfbbebf3da74eacec06d7f97c22a2f45193e58ac.tar.gz
* gcc-interface/utils.c (update_pointer_to): Return early if the old
pointer already points to the new type. Chain the old pointer and its variants at the end of new pointer's chain after updating them. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159309 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gnat.dg')
-rw-r--r--gcc/testsuite/gnat.dg/frame_overflow.adb1
-rw-r--r--gcc/testsuite/gnat.dg/lto8.adb22
-rw-r--r--gcc/testsuite/gnat.dg/lto8_pkg.adb9
-rw-r--r--gcc/testsuite/gnat.dg/lto8_pkg.ads18
4 files changed, 50 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/frame_overflow.adb b/gcc/testsuite/gnat.dg/frame_overflow.adb
index a20fdd73792..055fa283f19 100644
--- a/gcc/testsuite/gnat.dg/frame_overflow.adb
+++ b/gcc/testsuite/gnat.dg/frame_overflow.adb
@@ -1,4 +1,5 @@
-- { dg-do compile }
+-- { dg-xfail-if "missing late warning" { *-*-* } { "-flto" } { "" } }
with System;
diff --git a/gcc/testsuite/gnat.dg/lto8.adb b/gcc/testsuite/gnat.dg/lto8.adb
new file mode 100644
index 00000000000..68f9ea1197d
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/lto8.adb
@@ -0,0 +1,22 @@
+-- { dg-do run }
+-- { dg-options "-gnatws" }
+-- { dg-options "-gnatws -flto" { target lto } }
+
+pragma Locking_Policy (Ceiling_Locking);
+
+with Lto8_Pkg; use Lto8_Pkg;
+
+procedure Lto8 is
+ task Tsk is
+ pragma Priority (10);
+ end Tsk;
+ task body Tsk is
+ begin
+ Sema2.Seize;
+ Sema1.Seize;
+ exception
+ when Program_Error => null;
+ end;
+begin
+ null;
+end;
diff --git a/gcc/testsuite/gnat.dg/lto8_pkg.adb b/gcc/testsuite/gnat.dg/lto8_pkg.adb
new file mode 100644
index 00000000000..de4c2a75797
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/lto8_pkg.adb
@@ -0,0 +1,9 @@
+-- { dg-options "-gnatws" }
+
+package body Lto8_Pkg is
+
+ protected body Protected_Queue_T is
+ entry Seize when True is begin null; end;
+ end Protected_Queue_T;
+
+end Lto8_Pkg;
diff --git a/gcc/testsuite/gnat.dg/lto8_pkg.ads b/gcc/testsuite/gnat.dg/lto8_pkg.ads
new file mode 100644
index 00000000000..d9ea584df77
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/lto8_pkg.ads
@@ -0,0 +1,18 @@
+with System;
+with Unchecked_Conversion;
+
+package Lto8_Pkg is
+
+ type Task_Priority_T is new Natural;
+ function Convert_To_System_Priority is
+ new Unchecked_Conversion (Task_Priority_T, System.Priority);
+
+ protected type Protected_Queue_T( PO_Priority : Task_Priority_T ) is
+ pragma Priority (Convert_To_System_Priority (PO_Priority ));
+ entry Seize;
+ end Protected_Queue_T;
+
+ Sema1 : protected_Queue_T (5);
+ Sema2 : protected_Queue_T (10);
+
+end Lto8_Pkg;