From bf822e194fc7aeaadc9864b07e5bdcb047bae09e Mon Sep 17 00:00:00 2001 From: Richard Earnshaw Date: Thu, 9 May 2019 16:35:56 +0000 Subject: [PATCH] [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 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.target/arm/pr90405.c | 28 ++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 gcc/testsuite/gcc.target/arm/pr90405.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a95271ccf0a..f75dbe76784 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 00000000000..2e79b56d43d --- /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; +} -- 2.30.2