mirror of
https://forge.sourceware.org/marek/gcc.git
synced 2026-02-22 03:47:02 -05:00
2017-07-06 Christophe Lyon <christophe.lyon@linaro.org> gcc/ * doc/sourcebuild.texi (Test Directives, Variants of dg-require-support): Add documentation for dg-require-stack-check. gcc/testsuite/ * lib/target-supports-dg.exp (dg-require-stack-check): New. * lib/target-supports.exp (check_stack_check_available): New. * g++.dg/other/i386-9.C: Add dg-require-stack-check. * gcc.c-torture/compile/stack-check-1.c: Likewise. * gcc.dg/graphite/run-id-pr47653.c: Likewise. * gcc.dg/pr47443.c: Likewise. * gcc.dg/pr48134.c: Likewise. * gcc.dg/pr70017.c: Likewise. * gcc.target/aarch64/stack-checking.c: Likewise. * gcc.target/arm/stack-checking.c: Likewise. * gcc.target/i386/pr48723.c: Likewise. * gcc.target/i386/pr55672.c: Likewise. * gcc.target/i386/pr67265-2.c: Likewise. * gcc.target/i386/pr67265.c: Likewise. * gnat.dg/opt49.adb: Likewise. * gnat.dg/stack_check1.adb: Likewise. * gnat.dg/stack_check2.adb: Likewise. * gnat.dg/stack_check3.adb: Likewise. From-SVN: r250013
38 lines
675 B
Ada
38 lines
675 B
Ada
-- { dg-do compile }
|
|
-- { dg-require-stack-check "" }
|
|
-- { dg-options "-O -fstack-check" }
|
|
|
|
package body Stack_Check3 is
|
|
|
|
type Int_Arr is array (1 .. 34) of Integer;
|
|
|
|
type Rec (D : Boolean := False) is
|
|
record
|
|
case D is
|
|
when True => IA : Int_Arr;
|
|
when False => null;
|
|
end case;
|
|
end record;
|
|
|
|
type Rec_Arr is array (1 .. 256) of Rec;
|
|
|
|
protected Prot_Arr is
|
|
procedure Reset;
|
|
private
|
|
A : Rec_Arr;
|
|
end Prot_Arr;
|
|
|
|
protected body Prot_Arr is
|
|
procedure Reset is
|
|
begin
|
|
A := (others => (D => False));
|
|
end Reset;
|
|
end Prot_Arr;
|
|
|
|
procedure Reset is
|
|
begin
|
|
Prot_Arr.Reset;
|
|
end Reset;
|
|
|
|
end Stack_Check3;
|