diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-03-26 09:34:40 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-03-26 09:34:40 +0000 |
commit | 6a93a17773d0bc14c84b6d9c1831df0e38c363e2 (patch) | |
tree | 26ba2a9b9f6a154eeaec3ba42d01da1e79061f7a /gcc/testsuite/gnat.dg | |
parent | a87256553df7c2af1590ace3a1b20c74da6af9c1 (diff) | |
download | gcc-6a93a17773d0bc14c84b6d9c1831df0e38c363e2.tar.gz |
* inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
subprograms without a previous spec declared in the same unit.
* gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
subprograms at the end of the unit instead of at the beginning.
* gcc-interface/utils.c (create_subprog_decl): Check that the entity
isn't public for the special handling of non-inline functions nested
inside inline external functions.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171551 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gnat.dg')
-rw-r--r-- | gcc/testsuite/gnat.dg/opt15.adb | 12 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/opt15_pkg.adb | 13 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/opt15_pkg.ads | 6 |
3 files changed, 31 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/opt15.adb b/gcc/testsuite/gnat.dg/opt15.adb new file mode 100644 index 00000000000..eadc25d7023 --- /dev/null +++ b/gcc/testsuite/gnat.dg/opt15.adb @@ -0,0 +1,12 @@ +-- { dg-do compile } +-- { dg-options "-O -gnatn -fdump-tree-optimized" } + +with Opt15_Pkg; use Opt15_Pkg; + +procedure Opt15 is +begin + Trace_Inlined; +end; + +-- { dg-final { scan-tree-dump-not "trace_inlined" "optimized" } } +-- { dg-final { cleanup-tree-dump "optimized" } } diff --git a/gcc/testsuite/gnat.dg/opt15_pkg.adb b/gcc/testsuite/gnat.dg/opt15_pkg.adb new file mode 100644 index 00000000000..ebb1d263e81 --- /dev/null +++ b/gcc/testsuite/gnat.dg/opt15_pkg.adb @@ -0,0 +1,13 @@ +package body Opt15_Pkg is + + procedure Trace_Non_Inlined is + begin + raise Program_Error; + end; + + procedure Trace_Inlined is + begin + Trace_Non_Inlined; + end; + +end Opt15_Pkg; diff --git a/gcc/testsuite/gnat.dg/opt15_pkg.ads b/gcc/testsuite/gnat.dg/opt15_pkg.ads new file mode 100644 index 00000000000..f1d0302033d --- /dev/null +++ b/gcc/testsuite/gnat.dg/opt15_pkg.ads @@ -0,0 +1,6 @@ +package Opt15_Pkg is + + procedure Trace_Inlined; + pragma Inline (Trace_Inlined); + +end Opt15_Pkg; |