Commit ddb5a105 by Eric Botcazou Committed by Eric Botcazou

trans.c (create_temporary): New function taken from...

	* gcc-interface/trans.c (create_temporary): New function taken from...
	(create_init_temporary): ...here.  Call it.
	(call_to_gnu): Create the temporary for the return value early, if any.
	Create it for a function with copy-in/copy-out parameters if there is
	no target; in other cases of copy-in/copy-out, use another temporary.
	Push the new binding level lazily.  Add and rename local variables.

From-SVN: r171345
parent 3460fdf3
2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (create_temporary): New function taken from...
(create_init_temporary): ...here. Call it.
(call_to_gnu): Create the temporary for the return value early, if any.
Create it for a function with copy-in/copy-out parameters if there is
no target; in other cases of copy-in/copy-out, use another temporary.
Push the new binding level lazily. Add and rename local variables.
2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (validate_size): Improve comments and tweak
error message.
(set_rm_size): Likewise.
......
2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/discr26.ad[sb]: New test.
* gnat.dg/discr26_pkg.ads: New helper.
2011-03-23 Richard Sandiford <richard.sandiford@linaro.org>
PR target/47553
......
-- { dg-do compile }
-- { dg-options "-gnatws" }
package body Discr26 is
function F1 return My_T1 is
R: My_T1;
begin
return R;
end;
procedure Proc is
begin
if F1.D = 0 then
raise Program_Error;
end if;
end;
end Discr26;
with Discr26_Pkg;
package Discr26 is
type T1 (D : Integer) is record
case D is
when 1 => I : Integer;
when others => null;
end case;
end record;
type My_T1 is new T1 (Discr26_Pkg.N);
procedure Proc;
end Discr26;
package Discr26_Pkg is
function N return Integer;
end Discr26_Pkg;
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