aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/aarch64/pr90075.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/aarch64/pr90075.c')
-rw-r--r--gcc/testsuite/gcc.target/aarch64/pr90075.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/aarch64/pr90075.c b/gcc/testsuite/gcc.target/aarch64/pr90075.c
new file mode 100644
index 00000000000..cae7e618fc0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/pr90075.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-O1" } */
+
+typedef struct {
+ float one, two;
+} twofloats;
+
+float
+bug (twofloats tf)
+{
+ float f1, f2;
+ union {
+ twofloats tfloats;
+ float arr[2];
+ } utfloats;
+
+ utfloats.tfloats = tf;
+ f1 = utfloats.arr[1];
+ f2 = __builtin_copysignf (0, f1);
+ return f2;
+}