diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2017-09-09 12:45:45 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2017-09-09 12:45:45 +0000 |
commit | 3d25b3ba49e73ea62920786f1785db6cfc4daa85 (patch) | |
tree | 503da65fa6e4418bc843adb9ddb1eb79c5fc9fe9 /gcc/ada | |
parent | 87eddedc5f9ae385958edd24d9d42981f702ecb2 (diff) | |
download | gcc-3d25b3ba49e73ea62920786f1785db6cfc4daa85.zip gcc-3d25b3ba49e73ea62920786f1785db6cfc4daa85.tar.gz gcc-3d25b3ba49e73ea62920786f1785db6cfc4daa85.tar.bz2 |
trans.c (Subprogram_Body_to_gnu): Disregard inlining limits for expression functions.
* gcc-interface/trans.c (Subprogram_Body_to_gnu): Disregard inlining
limits for expression functions.
(gnat_to_gnu) <N_Object_Declaration>: Fix formatting.
From-SVN: r251935
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/trans.c | 7 |
2 files changed, 12 insertions, 1 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index f02fde2..804a79e 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,11 @@ 2017-09-09 Eric Botcazou <ebotcazou@adacore.com> + * gcc-interface/trans.c (Subprogram_Body_to_gnu): Disregard inlining + limits for expression functions. + (gnat_to_gnu) <N_Object_Declaration>: Fix formatting. + +2017-09-09 Eric Botcazou <ebotcazou@adacore.com> + * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Copy the layout of the record from the parent type only if both are or are not unchecked unions. diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c index 2f7d497..4536a76 100644 --- a/gcc/ada/gcc-interface/trans.c +++ b/gcc/ada/gcc-interface/trans.c @@ -3777,6 +3777,11 @@ Subprogram_Body_to_gnu (Node_Id gnat_node) Sloc_to_locus (Sloc (gnat_node), &locus); DECL_SOURCE_LOCATION (gnu_subprog_decl) = locus; + /* If the body comes from an expression function, arrange it to be inlined + in almost all cases. */ + if (Was_Expression_Function (gnat_node)) + DECL_DISREGARD_INLINE_LIMITS (gnu_subprog_decl) = 1; + /* Initialize the information structure for the function. */ allocate_struct_function (gnu_subprog_decl, false); gnu_subprog_language = ggc_cleared_alloc<language_function> (); @@ -6140,7 +6145,7 @@ gnat_to_gnu (Node_Id gnat_node) && (((Is_Array_Type (Etype (gnat_temp)) || Is_Record_Type (Etype (gnat_temp))) && !Is_Constrained (Etype (gnat_temp))) - || Is_Concurrent_Type (Etype (gnat_temp)))) + || Is_Concurrent_Type (Etype (gnat_temp)))) break; if (Present (Expression (gnat_node)) |