diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-20 08:49:02 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-20 08:49:02 +0000 |
commit | 57ecb9696dc295d055c637411d89a5bc4c6790d2 (patch) | |
tree | dbcafab193762e8e73114d4041c4d06e4f2c1f96 /gcc/ada/inline.adb | |
parent | bf3c33418a5d96fb15519a2716750c7f149863f8 (diff) | |
download | gcc-57ecb9696dc295d055c637411d89a5bc4c6790d2.tar.gz |
2009-04-20 Ed Schonberg <schonberg@adacore.com>
* inline.adb (Add_Inlined_Subprogram): Do not place on the back-end
list a caller of an inlined subprogram, if the caller itself is not
called.
2009-04-20 Pascal Obry <obry@adacore.com>
* adaint.c: Disable use of ACL on network drives.
2009-04-20 Arnaud Charlet <charlet@adacore.com>
* gnat_ugn.texi: Add examples.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146374 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/inline.adb')
-rw-r--r-- | gcc/ada/inline.adb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb index 33b4372ed6e..6fe50fd37d4 100644 --- a/gcc/ada/inline.adb +++ b/gcc/ada/inline.adb @@ -500,12 +500,21 @@ package body Inline is Inlined.Table (Index).Listed := True; + -- Now add to the list those callers of the current subprogram that + -- are themselves called. They may appear on the graph as callers + -- of the current one, even if they are themselves not called, and + -- there is no point in including them in the list for the backend. + -- Furthermore, they might not even be public, in which case the + -- back-end cannot handle them at all. + Succ := Inlined.Table (Index).First_Succ; while Succ /= No_Succ loop Subp := Successors.Table (Succ).Subp; Inlined.Table (Subp).Count := Inlined.Table (Subp).Count - 1; - if Inlined.Table (Subp).Count = 0 then + if Inlined.Table (Subp).Count = 0 + and then Is_Called (Inlined.Table (Subp).Name) + then Add_Inlined_Subprogram (Subp); end if; |