aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2012-08-06 10:17:25 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2012-08-06 10:17:25 +0200
commite68077239dc16ba900c6f3b631fd88032bc870d2 (patch)
treea045f0edbeb7f8290f764a4308dc6a58d30da10d /gcc
parent2aca76d6731a7d0602438ada075fcd651bde68cb (diff)
downloadgcc-e68077239dc16ba900c6f3b631fd88032bc870d2.zip
gcc-e68077239dc16ba900c6f3b631fd88032bc870d2.tar.gz
gcc-e68077239dc16ba900c6f3b631fd88032bc870d2.tar.bz2
[multiple changes]
2012-08-06 Geert Bosch <bosch@adacore.com> * a-ngelfu.adb: Change obsolete comment that this is a non-strict implementation. 2012-08-06 Steve Baird <baird@adacore.com> * exp_ch7.adb (Build_Finalizer.Process_Object_Declaration): If CodePeer_Mode = True then omit exception handlers for finalization calls 2012-08-06 Robert Dewar <dewar@adacore.com> * exp_aggr.adb: Minor reformatting. From-SVN: r190165
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog14
-rw-r--r--gcc/ada/a-ngelfu.adb6
-rw-r--r--gcc/ada/exp_aggr.adb5
-rw-r--r--gcc/ada/exp_ch7.adb13
4 files changed, 32 insertions, 6 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 2533fd3..0610114 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,17 @@
+2012-08-06 Geert Bosch <bosch@adacore.com>
+
+ * a-ngelfu.adb: Change obsolete comment that this is a non-strict
+ implementation.
+
+2012-08-06 Steve Baird <baird@adacore.com>
+
+ * exp_ch7.adb (Build_Finalizer.Process_Object_Declaration): If
+ CodePeer_Mode = True then omit exception handlers for finalization calls
+
+2012-08-06 Robert Dewar <dewar@adacore.com>
+
+ * exp_aggr.adb: Minor reformatting.
+
2012-08-06 Robert Dewar <dewar@adacore.com>
* sem_ch6.adb: Remove useless flag Body_Deleted.
diff --git a/gcc/ada/a-ngelfu.adb b/gcc/ada/a-ngelfu.adb
index ae95d66..cd426ca 100644
--- a/gcc/ada/a-ngelfu.adb
+++ b/gcc/ada/a-ngelfu.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2011, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2012, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -31,9 +31,7 @@
-- This body is specifically for using an Ada interface to C math.h to get
-- the computation engine. Many special cases are handled locally to avoid
--- unnecessary calls. This is not a "strict" implementation, but takes full
--- advantage of the C functions, e.g. in providing interface to hardware
--- provided versions of the elementary functions.
+-- unnecessary calls or to meet Annex G strict mode requirements.
-- Uses functions sqrt, exp, log, pow, sin, asin, cos, acos, tan, atan, sinh,
-- cosh, tanh from C library via math.h
diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb
index 98070a9..294a7d8 100644
--- a/gcc/ada/exp_aggr.adb
+++ b/gcc/ada/exp_aggr.adb
@@ -3737,6 +3737,9 @@ package body Exp_Aggr is
Analyze_And_Resolve (N, Typ);
end if;
+ -- Is Static_Eaboration_Desired has been specified, diagnose aggregates
+ -- that will still require initialization code.
+
if (Ekind (Current_Scope) = E_Package
and then Static_Elaboration_Desired (Current_Scope))
and then Nkind (Parent (N)) = N_Object_Declaration
@@ -3745,7 +3748,7 @@ package body Exp_Aggr is
Expr : Node_Id;
begin
- if Present (Expressions (N)) then
+ if Nkind (N) = N_Aggregate and then Present (Expressions (N)) then
Expr := First (Expressions (N));
while Present (Expr) loop
if Nkind_In (Expr, N_Integer_Literal, N_Real_Literal)
diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb
index 6297dc9..122065d 100644
--- a/gcc/ada/exp_ch7.adb
+++ b/gcc/ada/exp_ch7.adb
@@ -2645,7 +2645,18 @@ package body Exp_Ch7 is
Obj_Ref => Obj_Ref,
Typ => Obj_Typ);
- if Exceptions_OK then
+ -- For CodePeer, the exception handlers normally generated here
+ -- generate complex flowgraphs which result in capacity problems.
+ -- Omitting these handlers for CodePeer is justified as follows:
+
+ -- If a handler is dead, then omitting it is surely ok
+
+ -- If a handler is live, then CodePeer should flag the
+ -- potentially-exception-raising construct that causes it
+ -- to be live. That is what we are interested in, not what
+ -- happens after the exception is raised.
+
+ if Exceptions_OK and not CodePeer_Mode then
Fin_Stmts := New_List (
Make_Block_Statement (Loc,
Handled_Statement_Sequence =>