summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2015-11-12 11:40:26 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2015-11-12 11:40:26 +0000
commit9cda502dab7798e392ab0d9e8927afeaacdfedf4 (patch)
treee856a7f2f93456d2f37728a98f5d093dbcf9fcd7
parent1548739875d63ce4020234846712447c5c7f9f4f (diff)
downloadgcc-9cda502dab7798e392ab0d9e8927afeaacdfedf4.tar.gz
2015-11-12 Jerome Lambourg <lambourg@adacore.com>
* init.c: Do not try to mess with the MSR values in RTP mode: not needed and forbidden. 2015-11-12 Ed Schonberg <schonberg@adacore.com> * exp_attr.adb (Compile_Stream_Body_In_Scope): Do not install full view of a type that has pragma Stream_Convert, because this indicates special processing for the stream operations of the type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230240 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ada/ChangeLog12
-rw-r--r--gcc/ada/exp_attr.adb7
-rw-r--r--gcc/ada/init.c5
3 files changed, 22 insertions, 2 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 646d8d15acf..13c2be14cb9 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,15 @@
+2015-11-12 Jerome Lambourg <lambourg@adacore.com>
+
+ * init.c: Do not try to mess with the MSR values in RTP mode:
+ not needed and forbidden.
+
+2015-11-12 Ed Schonberg <schonberg@adacore.com>
+
+ * exp_attr.adb (Compile_Stream_Body_In_Scope): Do not install
+ full view of a type that has pragma Stream_Convert, because
+ this indicates special processing for the stream operations of
+ the type.
+
2015-11-12 Gary Dismukes <dismukes@adacore.com>
* exp_ch5.adb, sem_ch3.adb, exp_util.ads, inline.adb, freeze.adb,
diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb
index 8c0224705bc..d40f49de51c 100644
--- a/gcc/ada/exp_attr.adb
+++ b/gcc/ada/exp_attr.adb
@@ -650,12 +650,19 @@ package body Exp_Attr is
-- The component type may be private, in which case we install its
-- full view to compile the subprogram.
+ -- The component type may be private, in which case we install its
+ -- full view to compile the subprogram. We do not do this if the
+ -- type has a Stream_Convert pragma, which indicates that there are
+ -- special stream-processing operations for that type (for example
+ -- Unbounded_String and its wide varieties).
+
Scop := Scope (C_Type);
if Is_Private_Type (C_Type)
and then Present (Full_View (C_Type))
and then not In_Open_Scopes (Scop)
and then Ekind (Scop) = E_Package
+ and then No (Get_Stream_Convert_Pragma (C_Type))
then
Install := True;
end if;
diff --git a/gcc/ada/init.c b/gcc/ada/init.c
index 0ce64235b51..59fc335b6fe 100644
--- a/gcc/ada/init.c
+++ b/gcc/ada/init.c
@@ -1922,8 +1922,9 @@ __gnat_error_handler (int sig, siginfo_t *si, void *sc)
/* VxWorks on e500v2 clears the SPE bit of the MSR when entering CPU
exception state. To allow the handler and exception to work properly
when they contain SPE instructions, we need to set it back before doing
- anything else. */
-#if (CPU == PPCE500V2) || (CPU == PPC85XX)
+ anything else.
+ This mechanism is only need in kernel mode. */
+#if !(defined (__RTP__) || defined (CERT)) && ((CPU == PPCE500V2) || (CPU == PPC85XX))
register unsigned msr;
/* Read the MSR value */
asm volatile ("mfmsr %0" : "=r" (msr));