diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2012-11-09 09:10:04 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2012-11-09 09:10:04 +0000 |
commit | 4993465992b6711d8bda90247122135d01ed6f3d (patch) | |
tree | a0625b25649e54bcd74c20cddab79d541fe83668 /gcc | |
parent | 55fcb9015cdc05b33cd6ad52c5815120ebe88f24 (diff) | |
download | gcc-4993465992b6711d8bda90247122135d01ed6f3d.zip gcc-4993465992b6711d8bda90247122135d01ed6f3d.tar.gz gcc-4993465992b6711d8bda90247122135d01ed6f3d.tar.bz2 |
i386.c (release_scratch_register_on_entry): Also adjust sp_offset manually.
* config/i386/i386.c (release_scratch_register_on_entry): Also adjust
sp_offset manually.
From-SVN: r193352
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/stack_check3.adb | 36 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/stack_check3.ads | 5 |
5 files changed, 52 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a45d72b..f8f19ba 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2012-11-09 Eric Botcazou <ebotcazou@adacore.com> + + * config/i386/i386.c (release_scratch_register_on_entry): Also adjust + sp_offset manually. + 2012-11-08 Christian Bruel <christian.bruel@st.com> * tree-ssa-tail-merge.c (replace_block_by): Update bb2 profile count. @@ -55,7 +60,6 @@ * ipa-prop.c (determine_known_aggregate_parts): Skip writes to different declarations when tracking writes to a declaration. ->>>>>>> .r193349 2012-11-07 David S. Miller <davem@davemloft.net> * config/sparc/constraints.md ("U"): Document, in detail, diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index ec33622..3a6f494 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -9462,6 +9462,7 @@ release_scratch_register_on_entry (struct scratch_reg *sr) { if (sr->saved) { + struct machine_function *m = cfun->machine; rtx x, insn = emit_insn (gen_pop (sr->reg)); /* The RTX_FRAME_RELATED_P mechanism doesn't know about pop. */ @@ -9469,6 +9470,7 @@ release_scratch_register_on_entry (struct scratch_reg *sr) x = gen_rtx_PLUS (Pmode, stack_pointer_rtx, GEN_INT (UNITS_PER_WORD)); x = gen_rtx_SET (VOIDmode, stack_pointer_rtx, x); add_reg_note (insn, REG_FRAME_RELATED_EXPR, x); + m->fs.sp_offset -= UNITS_PER_WORD; } } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3d81982..226c5f8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2012-11-09 Eric Botcazou <ebotcazou@adacore.com> + + * gnat.dg/stack_check3.ad[sb]: New test. + 2012-11-08 Ian Lance Taylor <iant@google.com> * go.test/go-test.exp (go-gc-tests): Handle runoutput test type diff --git a/gcc/testsuite/gnat.dg/stack_check3.adb b/gcc/testsuite/gnat.dg/stack_check3.adb new file mode 100644 index 0000000..734ed42 --- /dev/null +++ b/gcc/testsuite/gnat.dg/stack_check3.adb @@ -0,0 +1,36 @@ +-- { dg-do compile } +-- { 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; diff --git a/gcc/testsuite/gnat.dg/stack_check3.ads b/gcc/testsuite/gnat.dg/stack_check3.ads new file mode 100644 index 0000000..869c418 --- /dev/null +++ b/gcc/testsuite/gnat.dg/stack_check3.ads @@ -0,0 +1,5 @@ +package Stack_Check3 is + + procedure Reset; + +end Stack_Check3; |