diff options
Diffstat (limited to 'gcc/ada/lib-writ.adb')
-rw-r--r-- | gcc/ada/lib-writ.adb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/gcc/ada/lib-writ.adb b/gcc/ada/lib-writ.adb index c5f9d01..b78e3eb 100644 --- a/gcc/ada/lib-writ.adb +++ b/gcc/ada/lib-writ.adb @@ -1440,9 +1440,21 @@ package body Lib.Writ is -- in the context of the parent, and their file table entries are -- not properly decorated, they are recognized syntactically. - if Present (Cunit_Entity (Unum)) + -- This optimization is disabled when inline is active, because + -- inline may propose some bodies for inlining, and decide later + -- that they may lead to circularities, in which case they are + -- also left unanalyzed in the file table. There is no simple way + -- to distinguish between the two kinds of unanalyzed entries, + -- so simplest is to skip this step. + + -- Actually, this optimization is always disabled, because it + -- breaks gnatfind. + + if False -- ??? + and then Present (Cunit_Entity (Unum)) and then Ekind (Cunit_Entity (Unum)) = E_Void and then Nkind (Unit (Cunit (Unum))) /= N_Subunit + and then not Inline_Active then goto Next_Unit; end if; |