diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2017-05-15 08:27:44 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2017-05-15 08:27:44 +0000 |
commit | 0c09a01e9ea0608df0ae6754f67d630c1e40bb04 (patch) | |
tree | 4c9ba6b6fbac20d5aef34f719eac44d35b061cc7 /gcc/ada/gcc-interface/trans.c | |
parent | b1b2b511e525b098204c590b0eafa7d36092b7e1 (diff) | |
download | gcc-0c09a01e9ea0608df0ae6754f67d630c1e40bb04.zip gcc-0c09a01e9ea0608df0ae6754f67d630c1e40bb04.tar.gz gcc-0c09a01e9ea0608df0ae6754f67d630c1e40bb04.tar.bz2 |
trans.c (Compilation_Unit_to_gnu): Skip subprograms on the inlined list that are not public.
* gcc-interface/trans.c (Compilation_Unit_to_gnu): Skip subprograms on
the inlined list that are not public.
* gcc-interface/utils.c (create_subprog_decl): Clear TREE_PUBLIC if
there is a pragma Inline_Always on the subprogram.
From-SVN: r248051
Diffstat (limited to 'gcc/ada/gcc-interface/trans.c')
-rw-r--r-- | gcc/ada/gcc-interface/trans.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c index ef0db27..117ce26 100644 --- a/gcc/ada/gcc-interface/trans.c +++ b/gcc/ada/gcc-interface/trans.c @@ -5472,6 +5472,15 @@ Compilation_Unit_to_gnu (Node_Id gnat_node) if (!optimize && !Has_Pragma_Inline_Always (gnat_entity)) continue; + /* The set of inlined subprograms is computed from data recorded early + during expansion and it can be a strict superset of the final set + computed after semantic analysis, for example if a call to such a + subprogram occurs in a pragma Assert and assertions are disabled. + In that case, semantic analysis resets Is_Public to false but the + entry for the subprogram in the inlining tables is stalled. */ + if (!Is_Public (gnat_entity)) + continue; + gnat_body = Parent (Declaration_Node (gnat_entity)); if (Nkind (gnat_body) != N_Subprogram_Body) { |