From: Richard Biener Date: Thu, 9 Mar 2017 13:20:03 +0000 (+0000) Subject: re PR ipa/79970 (ICE in add_stack_var, at cfgexpand.c:450 with always_inline attribute) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=26d7dc48b628d0fa16f2a1660b23602821c748f9;p=gcc.git re PR ipa/79970 (ICE in add_stack_var, at cfgexpand.c:450 with always_inline attribute) 2017-03-09 Richard Biener PR ipa/79970 * ipa-prop.c (ipa_modify_formal_parameters): Avoid changing alignment of BLKmode params. * gcc.dg/torture/pr79970.c: New testcase. From-SVN: r246001 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a50c7e97e0b..da50ae6cd43 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-03-09 Richard Biener + + PR ipa/79970 + * ipa-prop.c (ipa_modify_formal_parameters): Avoid changing + alignment of BLKmode params. + 2017-03-09 Kyrylo Tkachov PR target/79913 diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index d519cdfcbab..b3d51595d3f 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -4198,7 +4198,8 @@ ipa_modify_formal_parameters (tree fndecl, ipa_parm_adjustment_vec adjustments) else { ptype = adj->type; - if (is_gimple_reg_type (ptype)) + if (is_gimple_reg_type (ptype) + && TYPE_MODE (ptype) != BLKmode) { unsigned malign = GET_MODE_ALIGNMENT (TYPE_MODE (ptype)); if (TYPE_ALIGN (ptype) != malign) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 98f8733110b..78f68314db1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-03-09 Richard Biener + + PR ipa/79970 + * gcc.dg/torture/pr79970.c: New testcase. + 2017-03-09 Paolo Carlini PR c++/71966 diff --git a/gcc/testsuite/gcc.dg/torture/pr79970.c b/gcc/testsuite/gcc.dg/torture/pr79970.c new file mode 100644 index 00000000000..270d5d76813 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr79970.c @@ -0,0 +1,23 @@ +/* { dg-do compile } */ +/* { dg-skip-if "" { *-*-* } { "-flto" } { "" } } */ +/* { dg-additional-options "-mno-sse" { target x86_64-*-* i?86-*-* } } */ + +typedef int c __attribute__ ((__vector_size__ (16))); + +__attribute__((always_inline)) void d (void); /* { dg-warning "" } { dg-error 7 "inlining failed" } */ +void f(c x); + +inline void e (c *b) { + f (*b); +} + +void a () +{ + struct + { + c g[4]; + } h; + d (); + e (h.g); +} +