From 1d284ec5c859481b080f19d5ddc13e2580c708ef Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Fri, 22 Apr 2011 20:40:23 +0200 Subject: [PATCH] re PR target/48723 (ICE on function returning structure with -fstack-check on corei7-avx) PR target/48723 * config/i386/i386.c (ix86_expand_prologue): Update m->fs.sp_offset after the call to ix86_adjust_stack_and_probe. testsuite/ChangeLog: PR target/48723 * gcc.target/i386/pr48723.c: New test. From-SVN: r172866 --- gcc/ChangeLog | 15 +++++++++------ gcc/config/i386/i386.c | 1 + gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.target/i386/pr48723.c | 13 +++++++++++++ 4 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 gcc/testsuite/gcc.target/i386/pr48723.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a97896299e1..d57499df001 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-04-22 Uros Bizjak + + PR target/48723 + * config/i386/i386.c (ix86_expand_prologue): Update m->fs.sp_offset + after the call to ix86_adjust_stack_and_probe. + 2011-04-22 Joseph Myers * config/bfin/bfin-protos.h (Mmode): Don't define. Expand @@ -12,8 +18,7 @@ 2011-04-22 Martin Jambor PR middle-end/48585 - * tree-inline.c (copy_bb): Create new edges only for analyzed - nodes. + * tree-inline.c (copy_bb): Create new edges only for analyzed nodes. 2011-04-22 Alexander Monakov @@ -89,8 +94,7 @@ (expand_stack_vars): ...and here. (stack_var_cmp): Sort by descending order of size. (partition_stack_vars): Change heuristic. - (union_stack_vars): Fix to reflect changes in - partition_stack_vars. + (union_stack_vars): Fix to reflect changes in partition_stack_vars. (dump_stack_var_partition): Add newline after each partition. 2011-04-21 Dimitrios Apostolou @@ -103,8 +107,7 @@ 2011-04-21 Richard Guenther PR lto/48703 - * tree.c (free_lang_data_in_decl): Do not zero TREE_TYPE of - DECL_NAME. + * tree.c (free_lang_data_in_decl): Do not zero TREE_TYPE of DECL_NAME. 2011-04-21 Eric Botcazou diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 558eff11936..75927eeef50 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -10628,6 +10628,7 @@ ix86_expand_prologue (void) if (STACK_CHECK_MOVING_SP) { ix86_adjust_stack_and_probe (allocate); + m->fs.sp_offset += allocate; allocate = 0; } else diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index cbdd47c3540..d3383a55532 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-04-22 Uros Bizjak + + PR target/48723 + * gcc.target/i386/pr48723.c: New test. + 2011-04-22 Jakub Jelinek PR c/48716 diff --git a/gcc/testsuite/gcc.target/i386/pr48723.c b/gcc/testsuite/gcc.target/i386/pr48723.c new file mode 100644 index 00000000000..ad102090e9f --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr48723.c @@ -0,0 +1,13 @@ +/* { dg-do compile } */ +/* { dg-options "-fstack-check -mavx" } */ + +struct S0 +{ + int f0, f1, f2, f3; +} g_106; + +struct S0 +func_99 () +{ + return (g_106); +} -- 2.30.2