From: Richard Earnshaw Date: Thu, 9 May 2019 16:35:56 +0000 (+0000) Subject: [arm] PR target/90405 New test. X-Git-Tag: misc/cutover-git~5658 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf822e194fc7aeaadc9864b07e5bdcb047bae09e;p=thirdparty%2Fgcc.git [arm] PR target/90405 New test. This time really add the test. gcc/testsuite: PR target/90405 * gcc.target/arm/pr90405.c: New test. From-SVN: r271037 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a95271ccf0a6..f75dbe767840 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-05-09 Richard Earnshaw + + PR target/90405 + * gcc.target/arm/pr90405.c: New test. + 2019-05-09 Martin Liska * gcc.dg/gimplefe-39.c: New test. diff --git a/gcc/testsuite/gcc.target/arm/pr90405.c b/gcc/testsuite/gcc.target/arm/pr90405.c new file mode 100644 index 000000000000..2e79b56d43d2 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/pr90405.c @@ -0,0 +1,28 @@ +/* PR target/90405 */ +/* { dg-do compile } */ +/* { dg-require-effective-target arm_thumb1_ok } */ +/* { dg-options "-Ofast -mthumb -mtpcs-leaf-frame" } */ + + +#define vector __attribute((vector_size(16))) +vector float a; + +float +foo (float b) +{ + vector float c = { 0, 0, 0, 0 }; + vector float d = { 0, 0, 0, 0 }; + d += c; + return ((float *)&c)[2]; +} + +float +bar (vector float a, int b, vector float c) +{ + vector float e = c * a; + a = (vector float) { 0, 0, 0, 0 }; + c = (vector float) { 0, 0, 0, 0 }; + float d = ((float *)&a)[0]; + float f = ((float *)&c)[0]; + return d * f; +}