summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-20 10:07:30 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-20 10:07:30 +0000
commit234aa17e4220f5d86485dd188b2b0b2171a9c02e (patch)
tree3f5e6659bb1a3d04e80fe22da42dc8149d0f0e0a /gcc
parentf38c80845185fcfa4b73fb4ef523aada041d574d (diff)
downloadgcc-234aa17e4220f5d86485dd188b2b0b2171a9c02e.tar.gz
2009-04-20 Eric Botcazou <ebotcazou@adacore.com>
* gnat_ugn.texi: Add documentation for -fno-ivopts. 2009-04-20 Ed Schonberg <schonberg@adacore.com> * sem_ch10.adb (Analyze_Context): Do not analyze a unit in a with_clause if it is the main unit. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146390 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog9
-rw-r--r--gcc/ada/gnat_ugn.texi9
-rw-r--r--gcc/ada/sem_ch10.adb13
3 files changed, 28 insertions, 3 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index ebc1ea03e86..d2370239a88 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,12 @@
+2009-04-20 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat_ugn.texi: Add documentation for -fno-ivopts.
+
+2009-04-20 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch10.adb (Analyze_Context): Do not analyze a unit in a
+ with_clause if it is the main unit.
+
2009-04-20 Thomas Quinot <quinot@adacore.com>
* sem_type.adb, ali.adb, erroutc.adb: Minor code reorganization
diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi
index 7d573f7175e..e9b5a664791 100644
--- a/gcc/ada/gnat_ugn.texi
+++ b/gcc/ada/gnat_ugn.texi
@@ -3815,6 +3815,15 @@ if @option{-O2} is used.
Suppresses inlining of subprograms local to the unit and called once
from within it, which is enabled if @option{-O1} is used.
+@item -fno-ivopts
+@cindex @option{-fno-ivopts} (@command{gcc})
+Suppresses high-level loop induction variable optimizations, which are
+enabled if @option{-O1} is used. These optimizations are generally
+profitable but, for some specific cases of loops with numerous uses
+of the iteration variable that follow a common pattern, they may end
+up destroying the regularity that could be exploited at a lower level
+and thus producing inferior code.
+
@item -fno-strict-aliasing
@cindex @option{-fno-strict-aliasing} (@command{gcc})
Causes the compiler to avoid assumptions regarding non-aliasing
diff --git a/gcc/ada/sem_ch10.adb b/gcc/ada/sem_ch10.adb
index 17f907492ee..0a32539774f 100644
--- a/gcc/ada/sem_ch10.adb
+++ b/gcc/ada/sem_ch10.adb
@@ -774,7 +774,7 @@ package body Sem_Ch10 is
Version_Update (N, Lib_Unit);
end if;
- -- Comment needed here ???
+ -- If this is a child unit, generate references to the parents.
if Nkind (Defining_Unit_Name (Specification (Unit_Node))) =
N_Defining_Program_Unit_Name
@@ -1278,9 +1278,16 @@ package body Sem_Ch10 is
then
-- Skip analyzing with clause if no unit, nothing to do (this
-- happens for a with that references a non-existent unit)
+ -- Skip as well if this is a with_clause for the main unit, which
+ -- happens if a subunit has a useless with_clause on its parent.
if Present (Library_Unit (Item)) then
- Analyze (Item);
+ if Library_Unit (Item) /= Cunit (Current_Sem_Unit) then
+ Analyze (Item);
+
+ else
+ Set_Entity (Name (Item), Cunit_Entity (Current_Sem_Unit));
+ end if;
end if;
if not Implicit_With (Item) then
@@ -3111,7 +3118,7 @@ package body Sem_Ch10 is
if Is_Child_Spec (Lib_Unit) then
- -- The unit also has implicit withs on its own parents
+ -- The unit also has implicit with_clauses on its own parents
if No (Context_Items (N)) then
Set_Context_Items (N, New_List);