diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-20 10:49:02 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-20 10:49:02 +0200 |
commit | f8b86c2d808dadbb9143adacc1b0c162dbf58e1a (patch) | |
tree | dbcafab193762e8e73114d4041c4d06e4f2c1f96 /gcc/ada/inline.adb | |
parent | efec4f2a560b7b903f74ae8dbe98716f8e39587d (diff) | |
download | gcc-f8b86c2d808dadbb9143adacc1b0c162dbf58e1a.zip gcc-f8b86c2d808dadbb9143adacc1b0c162dbf58e1a.tar.gz gcc-f8b86c2d808dadbb9143adacc1b0c162dbf58e1a.tar.bz2 |
[multiple changes]
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.
From-SVN: r146374
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 33b4372..6fe50fd 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; |