From: Richard Biener Date: Mon, 15 Mar 2010 13:05:05 +0000 (+0000) Subject: re PR tree-optimization/43317 (ICE: Segmentation fault with -fipa-struct-reorg -g) X-Git-Tag: releases/gcc-4.5.0~376 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=610de68dbe2c55bad224111693e12cdb00aa87b8;p=thirdparty%2Fgcc.git re PR tree-optimization/43317 (ICE: Segmentation fault with -fipa-struct-reorg -g) 2010-03-15 Richard Guenther PR tree-optimization/43317 * ipa-struct-reorg.c (create_new_general_access): Update stmt. * gcc.dg/pr43317.c: New testcase. From-SVN: r157457 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fcb54526627f..bd0736436c83 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,6 +1,11 @@ +2010-03-15 Richard Guenther + + PR tree-optimization/43317 + * ipa-struct-reorg.c (create_new_general_access): Update stmt. + 2010-03-15 Martin Jambor - PR tree/optimization/43141 + PR tree-optimization/43141 * tree-sra.c (create_abstract_origin): New function. (modify_function): Call create_abstract_origin. diff --git a/gcc/ipa-struct-reorg.c b/gcc/ipa-struct-reorg.c index e0336aa1a134..24b42e3ed035 100644 --- a/gcc/ipa-struct-reorg.c +++ b/gcc/ipa-struct-reorg.c @@ -1389,6 +1389,7 @@ create_new_general_access (struct access_site *acc, d_str str) for now just reset all debug stmts referencing objects that have been peeled. */ gimple_debug_bind_reset_value (stmt); + update_stmt (stmt); break; default: diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f70b5e641996..65c465fa02b4 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2010-03-15 Richard Guenther + + PR tree-optimization/43317 + * gcc.dg/pr43317.c: New testcase. + 2010-03-14 Uros Bizjak * g++.dg/abi/packed1.C: Expect warning on the alpha*-*-*. diff --git a/gcc/testsuite/gcc.dg/pr43317.c b/gcc/testsuite/gcc.dg/pr43317.c new file mode 100644 index 000000000000..3ee3ed549319 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr43317.c @@ -0,0 +1,15 @@ +/* { dg-do compile } */ +/* { dg-options "-O -fipa-struct-reorg -fwhole-program -fipa-type-escape -g" } */ + +extern void *malloc(__SIZE_TYPE__); + +struct S { + int i; +}; + +int main(int argc, char *argv[]) +{ + int i = argc; + struct S *p = malloc(sizeof (struct S)); + return p[i].i; +}