Commit a7635800 by Eric Botcazou Committed by Eric Botcazou

stack_usage1.adb: New test.

	* gnat.dg/stack_usage1.adb: New test.
	* gnat.dg/stack_usage1_pkg.ad[sb]: New helper.

	* gcc.dg/pr44194-1.c: Remove superfluous include directive.
	* gcc.dg/pr44194-2.c: Likewise.

From-SVN: r183604
parent cb485fff
2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/stack_usage1.adb: New test.
* gnat.dg/stack_usage1_pkg.ad[sb]: New helper.
* gcc.dg/pr44194-1.c: Remove superfluous include directive.
* gcc.dg/pr44194-2.c: Likewise.
2012-01-26 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51370
......
......@@ -3,8 +3,6 @@
/* Restricting to 64-bit targets since 32-bit targets return
structures in memory. */
#include <stdint.h>
struct ints { int a, b, c; } foo();
void bar(int a, int b);
......
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-rtl-dse1" } */
#include <stdint.h>
struct ints { int a, b, c; } foo();
void bar(int a, int b);
......
-- { dg-do compile }
-- { dg-options "-fstack-usage" }
with Stack_Usage1_Pkg; use Stack_Usage1_Pkg;
procedure Stack_Usage1 is
A : Integer := Ident_Int (123);
begin
case A is
when 0 =>
My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
when 1 =>
My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
when 2 =>
My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
when 3 =>
My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
when 4 =>
My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
when 5 =>
My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
when 6 =>
My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
when 7 =>
My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
when 8 =>
My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
when 9 =>
My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
when others =>
null;
end case;
end Stack_Usage1;
-- { dg-final { scan-stack-usage "\t\[0-9\]\[0-9\]\t" { target i?86-*-* x86_64-*-* } } }
-- { dg-final { cleanup-stack-usage } }
package body Stack_Usage1_Pkg is
function Ident_Int (X : Integer) return Integer is
begin
return X;
end Ident_Int;
procedure My_Proc (X : R) is
begin
null;
end My_Proc;
end Stack_Usage1_Pkg;
package Stack_Usage1_Pkg is
function Ident_Int (X : Integer) return Integer;
type R is
record
C0, C1, C2, C3, C4, C5, C6, C7, C8, C9 : Integer;
end record;
procedure My_Proc (X : R);
end Stack_Usage1_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