tree-ssa-ccp.c (insert_clobber_before_stack_restore): Recurse on copy assignment statements.

* tree-ssa-ccp.c (insert_clobber_before_stack_restore): Recurse on copy
	assignment statements.

From-SVN: r202835
This commit is contained in:
Eric Botcazou 2013-09-23 16:16:41 +00:00 committed by Eric Botcazou
parent 85a7674341
commit 9e1a7bf1fa
6 changed files with 63 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2013-09-23 Eric Botcazou <ebotcazou@adacore.com>
* tree-ssa-ccp.c (insert_clobber_before_stack_restore): Recurse on copy
assignment statements.
2013-09-20 John David Anglin <danglin@gcc.gnu.org>
* config/pa/pa.md: In "scc" insn patterns, change output template to

View File

@ -1,3 +1,8 @@
2013-09-23 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/opt28.ad[sb]: New test.
* gnat.dg/opt28_pkg.ads: New helper.
2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/in_out_parameter4.adb: New test.

View File

@ -0,0 +1,31 @@
with Opt28_Pkg; use Opt28_Pkg;
package body Opt28 is
function Full_Filename (Filename : String) return String is
Path : constant String := "PATH";
Posix_Path : constant Posix_String := To_Posix (Path);
begin
declare
M : constant Posix_String := Value_Of (Posix_Path);
N : constant Posix_String (1 .. M'Length) := M;
Var : constant String := To_String (Str => N);
Start_Pos : Natural := 1;
End_Pos : Natural := 1;
begin
while Start_Pos <= Var'Length loop
End_Pos := Position (Var (Start_Pos .. Var'Length));
if Is_File (To_Posix (Var (Start_Pos .. End_Pos - 1) & Filename)) then
return Var (Start_Pos .. End_Pos - 1) & Filename;
else
Start_Pos := End_Pos + 1;
end if;
end loop;
end;
return "";
end;
end Opt28;

View File

@ -0,0 +1,8 @@
-- { dg-do compile }
-- { dg-options "-O2" }
package Opt28 is
function Full_Filename (Filename : String) return String;
end Opt28;

View File

@ -0,0 +1,11 @@
package Opt28_Pkg is
type Posix_String is array (Positive range <>) of aliased Character;
function To_Posix (Str : String) return Posix_String;
function To_String (Str : Posix_String) return String;
function Is_File (Str : Posix_String) return Boolean;
function Value_Of (Name : Posix_String) return Posix_String;
function Position (In_Line : String) return Natural;
end Opt28_Pkg;

View File

@ -1744,6 +1744,9 @@ insert_clobber_before_stack_restore (tree saved_val, tree var, htab_t *visited)
insert_clobber_before_stack_restore (gimple_phi_result (stmt), var,
visited);
}
else if (gimple_assign_ssa_name_copy_p (stmt))
insert_clobber_before_stack_restore (gimple_assign_lhs (stmt), var,
visited);
else
gcc_assert (is_gimple_debug (stmt));
}