diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-03-09 13:20:03 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-03-09 13:20:03 +0000 |
commit | 51c0b90bb4c04820b5074a8786a76a8033ef9367 (patch) | |
tree | dca61888720a921a74449023227df9508f9e36ab | |
parent | 6741c74cb2d7aa65ce2b44a5243b754463524c8b (diff) | |
download | gcc-51c0b90bb4c04820b5074a8786a76a8033ef9367.tar.gz |
2017-03-09 Richard Biener <rguenther@suse.de>
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
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/ipa-prop.c | 3 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr79970.c | 23 |
4 files changed, 36 insertions, 1 deletions
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 <rguenther@suse.de> + + PR ipa/79970 + * ipa-prop.c (ipa_modify_formal_parameters): Avoid changing + alignment of BLKmode params. + 2017-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com> 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 <rguenther@suse.de> + + PR ipa/79970 + * gcc.dg/torture/pr79970.c: New testcase. + 2017-03-09 Paolo Carlini <paolo.carlini@oracle.com> 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); +} + |