From: rguenth Date: Thu, 9 Mar 2017 13:20:03 +0000 (+0000) Subject: 2017-03-09 Richard Biener X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=51c0b90bb4c04820b5074a8786a76a8033ef9367;p=thirdparty%2Fgcc.git 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@246001 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a50c7e97e0b6..da50ae6cd43d 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 d519cdfcbaba..b3d51595d3fa 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 98f8733110b3..78f68314db1a 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 000000000000..270d5d76813b --- /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); +} +