Commit 4ebd491f by Eric Botcazou Committed by Eric Botcazou

ipa-icf.c (sem_function::merge): Do not create a wrapper also if the original…

ipa-icf.c (sem_function::merge): Do not create a wrapper also if the original function needs a static chain.

	* ipa-icf.c (sem_function::merge): Do not create a wrapper also if the
	original function needs a static chain.

From-SVN: r242354
parent 499266dc
2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
* ipa-icf.c (sem_function::merge): Do not create a wrapper also if the
original function needs a static chain.
2016-11-13 David Edelsohn <dje.gcc@gmail.com>
PR target/78336
......@@ -1186,11 +1186,12 @@ sem_function::merge (sem_item *alias_item)
fprintf (dump_file,
"Wrapper cannot be created because of COMDAT\n");
}
else if (DECL_STATIC_CHAIN (alias->decl))
else if (DECL_STATIC_CHAIN (alias->decl)
|| DECL_STATIC_CHAIN (original->decl))
{
if (dump_file)
fprintf (dump_file,
"Can not create wrapper of nested functions.\n");
"Cannot create wrapper of nested function.\n");
}
/* TODO: We can also deal with variadic functions never calling
VA_START. */
......
2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/lto21.adb: New test.
* gnat.dg/lto21_pkg1.ads: New helper.
* gnat.dg/lto21_pkg2.ad[sb]: Likewise.
2016-11-13 Janus Weil <janus@gcc.gnu.org>
PR fortran/60952
......
-- { dg-do run }
-- { dg-options "-O3 -flto" { target lto } }
with Lto21_Pkg1;
with Lto21_Pkg2; use Lto21_Pkg2;
procedure Lto21 is
begin
Proc;
end;
with Ada.Containers.Vectors;
with Lto21_Pkg2;
package Lto21_Pkg1 is
pragma Suppress (Tampering_Check);
package Vect1 is new Ada.Containers.Vectors (Positive, Natural);
end Lto21_Pkg1;
with Ada.Containers; use Ada.Containers;
with Ada.Containers.Hashed_Maps;
with Ada.Containers.Vectors;
package body Lto21_Pkg2 is
pragma Suppress (Tampering_Check);
procedure Proc is
function Hash (Syd : Natural) return Hash_Type is (Hash_Type'Mod (Syd));
package Vect2 is new Vectors (Positive, Natural);
package Maps is
new Hashed_Maps (Natural, Vect2.Vector, Hash, "=", Vect2."=");
procedure Nested (M : Maps.Map) is
use Maps;
procedure Inner (Position : Cursor) is null;
begin
Iterate (M, Inner'Access);
end;
M : Maps.Map;
begin
Nested (M);
end;
end Lto21_Pkg2;
package Lto21_Pkg2 is
procedure Proc;
end Lto21_Pkg2;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment