Commit 6dc4bfc4 by Eric Botcazou Committed by Eric Botcazou

case_optimization1.ad[sb]: New test.

	* case_optimization1.ad[sb]: New test.
	* case_optimization_pkg1.ads: New helper.

From-SVN: r137796
parent 66bfd481
2008-07-14 Eric Botcazou <ebotcazou@adacore.com>
* case_optimization1.ad[sb]: New test.
* case_optimization_pkg1.ads: New helper.
2008-07-14 Jakub Jelinek <jakub@redhat.com> 2008-07-14 Jakub Jelinek <jakub@redhat.com>
PR target/36745 PR target/36745
......
-- { dg-do compile }
-- { dg-options "-O2" }
package body Case_Optimization1 is
function F (Op_Kind : Internal_Operator_Symbol_Kinds) return Integer is
begin
case Op_Kind is
when A_Not_Operator => return 3;
when An_Exponentiate_Operator => return 2;
when others => return 1;
end case;
end;
function Len (E : Element) return Integer is
Op_Kind : Internal_Element_Kinds := Int_Kind (E);
begin
return F (Int_Kind (E));
end;
end Case_Optimization1;
with Case_Optimization_Pkg1; use Case_Optimization_Pkg1;
package Case_Optimization1 is
function Len (E : Element) return Integer;
end Case_Optimization1;
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