aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r--gcc/testsuite/gcc.dg/align-3.c11
-rw-r--r--gcc/testsuite/gcc.dg/const-float128-ped.c4
-rw-r--r--gcc/testsuite/gcc.dg/const-float128.c4
-rw-r--r--gcc/testsuite/gcc.dg/goacc/nested-function-1.c100
-rw-r--r--gcc/testsuite/gcc.dg/goacc/nested-function-2.c45
-rw-r--r--gcc/testsuite/gcc.dg/goacc/pr71373.c41
-rw-r--r--gcc/testsuite/gcc.dg/guality/param-5.c38
-rw-r--r--gcc/testsuite/gcc.dg/pr71518.c25
-rw-r--r--gcc/testsuite/gcc.dg/pr71558.c17
-rw-r--r--gcc/testsuite/gcc.dg/pr71581.c24
-rw-r--r--gcc/testsuite/gcc.dg/pr71685.c6
-rw-r--r--gcc/testsuite/gcc.dg/spellcheck-options-12.c7
-rw-r--r--gcc/testsuite/gcc.dg/torture/float128-cmp-invalid.c5
-rw-r--r--gcc/testsuite/gcc.dg/torture/float128-div-underflow.c5
-rw-r--r--gcc/testsuite/gcc.dg/torture/float128-extend-nan.c5
-rw-r--r--gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-2.c5
-rw-r--r--gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-3.c5
-rw-r--r--gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode.c5
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr71423.c20
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr71452.c10
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr71522.c27
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr71606.c11
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp101.c13
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr71259.c28
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr71264.c20
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr71823.c14
26 files changed, 487 insertions, 8 deletions
diff --git a/gcc/testsuite/gcc.dg/align-3.c b/gcc/testsuite/gcc.dg/align-3.c
new file mode 100644
index 00000000000..5c97d5ac3cc
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/align-3.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-rtl-expand" } */
+
+typedef struct { char a[2]; } __attribute__((__packed__)) TU2;
+unsigned short get16_unaligned(const void *p) {
+ unsigned short v;
+ *(TU2 *)(void *)(&v) = *(const TU2 *)p;
+ return v;
+}
+
+/* { dg-final { scan-rtl-dump "MEM\[^\n\r\]*A8\\\]" "expand" } } */
diff --git a/gcc/testsuite/gcc.dg/const-float128-ped.c b/gcc/testsuite/gcc.dg/const-float128-ped.c
index 6a6b6223ce2..c1869cc43f3 100644
--- a/gcc/testsuite/gcc.dg/const-float128-ped.c
+++ b/gcc/testsuite/gcc.dg/const-float128-ped.c
@@ -1,5 +1,7 @@
/* Test 'q' suffix with -pedantic on __float128 type constants. */
-/* { dg-do compile { target ia64-*-* i?86-*-* x86_64-*-* } } */
+/* { dg-do compile } */
+/* { dg-require-effective-target __float128 } */
/* { dg-options "-pedantic" } */
+/* { dg-add-options __float128 } */
__float128 a = 123.456789q; /* { dg-warning "non-standard suffix on floating constant" } */
diff --git a/gcc/testsuite/gcc.dg/const-float128.c b/gcc/testsuite/gcc.dg/const-float128.c
index 116e4597b44..15394b483fc 100644
--- a/gcc/testsuite/gcc.dg/const-float128.c
+++ b/gcc/testsuite/gcc.dg/const-float128.c
@@ -1,6 +1,8 @@
/* Test 'q' and 'Q' suffixes on __float128 type constants. */
-/* { dg-do compile { target ia64-*-* i?86-*-* x86_64-*-* } } */
+/* { dg-do compile } */
+/* { dg-require-effective-target __float128 } */
/* { dg-options "" } */
+/* { dg-add-options __float128 } */
__float128 a = 123.456789q;
__float128 b = 123.456789Q;
diff --git a/gcc/testsuite/gcc.dg/goacc/nested-function-1.c b/gcc/testsuite/gcc.dg/goacc/nested-function-1.c
new file mode 100644
index 00000000000..e17c0e2227f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/goacc/nested-function-1.c
@@ -0,0 +1,100 @@
+/* Exercise nested function decomposition, gcc/tree-nested.c. */
+/* See gcc/testsuite/gfortran.dg/goacc/nested-function-1.f90 for the Fortran
+ version. */
+
+int main ()
+{
+#define N 100
+ int nonlocal_arg;
+ int nonlocal_a[N];
+ int nonlocal_i;
+ int nonlocal_j;
+
+ for (int i = 0; i < N; ++i)
+ nonlocal_a[i] = 5;
+ nonlocal_arg = 5;
+
+ void local ()
+ {
+ int local_i;
+ int local_arg;
+ int local_a[N];
+ int local_j;
+
+ for (int i = 0; i < N; ++i)
+ local_a[i] = 5;
+ local_arg = 5;
+
+#pragma acc kernels loop \
+ gang(num:local_arg) worker(local_arg) vector(local_arg) \
+ wait async(local_arg)
+ for (local_i = 0; local_i < N; ++local_i)
+ {
+#pragma acc cache (local_a[local_i:5])
+ local_a[local_i] = 100;
+#pragma acc loop seq tile(*)
+ for (local_j = 0; local_j < N; ++local_j)
+ ;
+#pragma acc loop auto independent tile(1)
+ for (local_j = 0; local_j < N; ++local_j)
+ ;
+ }
+
+#pragma acc kernels loop \
+ gang(static:local_arg) worker(local_arg) vector(local_arg) \
+ wait(local_arg, local_arg + 1, local_arg + 2) async
+ for (local_i = 0; local_i < N; ++local_i)
+ {
+#pragma acc cache (local_a[local_i:4])
+ local_a[local_i] = 100;
+#pragma acc loop seq tile(1)
+ for (local_j = 0; local_j < N; ++local_j)
+ ;
+#pragma acc loop auto independent tile(*)
+ for (local_j = 0; local_j < N; ++local_j)
+ ;
+ }
+ }
+
+ void nonlocal ()
+ {
+ for (int i = 0; i < N; ++i)
+ nonlocal_a[i] = 5;
+ nonlocal_arg = 5;
+
+#pragma acc kernels loop \
+ gang(num:nonlocal_arg) worker(nonlocal_arg) vector(nonlocal_arg) \
+ wait async(nonlocal_arg)
+ for (nonlocal_i = 0; nonlocal_i < N; ++nonlocal_i)
+ {
+#pragma acc cache (nonlocal_a[nonlocal_i:3])
+ nonlocal_a[nonlocal_i] = 100;
+#pragma acc loop seq tile(2)
+ for (nonlocal_j = 0; nonlocal_j < N; ++nonlocal_j)
+ ;
+#pragma acc loop auto independent tile(3)
+ for (nonlocal_j = 0; nonlocal_j < N; ++nonlocal_j)
+ ;
+ }
+
+#pragma acc kernels loop \
+ gang(static:nonlocal_arg) worker(nonlocal_arg) vector(nonlocal_arg) \
+ wait(nonlocal_arg, nonlocal_arg + 1, nonlocal_arg + 2) async
+ for (nonlocal_i = 0; nonlocal_i < N; ++nonlocal_i)
+ {
+#pragma acc cache (nonlocal_a[nonlocal_i:2])
+ nonlocal_a[nonlocal_i] = 100;
+#pragma acc loop seq tile(*)
+ for (nonlocal_j = 0; nonlocal_j < N; ++nonlocal_j)
+ ;
+#pragma acc loop auto independent tile(*)
+ for (nonlocal_j = 0; nonlocal_j < N; ++nonlocal_j)
+ ;
+ }
+ }
+
+ local ();
+ nonlocal ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/goacc/nested-function-2.c b/gcc/testsuite/gcc.dg/goacc/nested-function-2.c
new file mode 100644
index 00000000000..70c9ec8ebfa
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/goacc/nested-function-2.c
@@ -0,0 +1,45 @@
+/* Exercise nested function decomposition, gcc/tree-nested.c. */
+
+int
+main (void)
+{
+ int j = 0, k = 6, l = 7, m = 8;
+ void simple (void)
+ {
+ int i;
+#pragma acc parallel
+ {
+#pragma acc loop
+ for (i = 0; i < m; i+= k)
+ j = (m + i - j) * l;
+ }
+ }
+ void collapse (void)
+ {
+ int x, y, z;
+#pragma acc parallel
+ {
+#pragma acc loop collapse (3)
+ for (x = 0; x < k; x++)
+ for (y = -5; y < l; y++)
+ for (z = 0; z < m; z++)
+ j += x + y + z;
+ }
+ }
+ void reduction (void)
+ {
+ int x, y, z;
+#pragma acc parallel reduction (+:j)
+ {
+#pragma acc loop reduction (+:j) collapse (3)
+ for (x = 0; x < k; x++)
+ for (y = -5; y < l; y++)
+ for (z = 0; z < m; z++)
+ j += x + y + z;
+ }
+ }
+ simple();
+ collapse();
+ reduction();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/goacc/pr71373.c b/gcc/testsuite/gcc.dg/goacc/pr71373.c
new file mode 100644
index 00000000000..9381752cc9d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/goacc/pr71373.c
@@ -0,0 +1,41 @@
+/* Unintentional nested function usage. */
+/* Due to missing right braces '}', the following functions are parsed as
+ nested functions. This ran into an ICE. */
+
+void foo (void)
+{
+ #pragma acc parallel
+ {
+ #pragma acc loop independent
+ for (int i = 0; i < 16; i++)
+ ;
+ // Note right brace '}' commented out here.
+ //}
+}
+void bar (void)
+{
+}
+
+// Adding right brace '}' here, to make this compile.
+}
+
+
+// ..., and the other way round:
+
+void BAR (void)
+{
+// Note right brace '}' commented out here.
+//}
+
+void FOO (void)
+{
+ #pragma acc parallel
+ {
+ #pragma acc loop independent
+ for (int i = 0; i < 16; i++)
+ ;
+ }
+}
+
+// Adding right brace '}' here, to make this compile.
+}
diff --git a/gcc/testsuite/gcc.dg/guality/param-5.c b/gcc/testsuite/gcc.dg/guality/param-5.c
new file mode 100644
index 00000000000..8ca82ea68e5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/param-5.c
@@ -0,0 +1,38 @@
+/* { dg-do run } */
+/* { dg-options "-g" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } */
+
+typedef __UINTPTR_TYPE__ uintptr_t;
+
+typedef struct { uintptr_t pa; uintptr_t pb; } fatp_t
+ __attribute__ ((aligned (2 * __alignof__ (uintptr_t))));
+
+__attribute__((noinline, noclone)) void
+clear_stack (void)
+{
+ char a[128 * 1024 + 128];
+
+ __builtin_memset (a + 128 * 1024, 0, 128);
+}
+
+__attribute__((noinline, noclone)) void
+foo (fatp_t str, int count)
+{
+ char a[128 * 1024];
+
+ if (count > 0)
+ foo (str, count - 1);
+ clear_stack ();
+ count--; /* BREAK */
+}
+
+int
+main (void)
+{
+ fatp_t ptr = { 31415927, 27182818 };
+ foo (ptr, 1);
+ return 0;
+}
+
+/* { dg-final { gdb-test 26 "str.pa" "31415927" } } */
+/* { dg-final { gdb-test 26 "str.pb" "27182818" } } */
diff --git a/gcc/testsuite/gcc.dg/pr71518.c b/gcc/testsuite/gcc.dg/pr71518.c
new file mode 100644
index 00000000000..6240ca8f2bf
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr71518.c
@@ -0,0 +1,25 @@
+/* PR tree-optimization/71518 */
+/* { dg-options "-O3" } */
+
+int a, *b[9], c, d, e;
+
+static int
+fn1 ()
+{
+ for (c = 6; c >= 0; c--)
+ for (d = 0; d < 2; d++)
+ {
+ b[d * 2 + c] = 0;
+ e = a > 1 ? : 0;
+ if (e == 2)
+ return 0;
+ }
+ return 0;
+}
+
+int
+main ()
+{
+ fn1 ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr71558.c b/gcc/testsuite/gcc.dg/pr71558.c
new file mode 100644
index 00000000000..33a648e108c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr71558.c
@@ -0,0 +1,17 @@
+/* PR tree-optimization/71588 */
+
+/* strcpy must not be pure, but make sure we don't ICE even when
+ it is declared incorrectly. */
+char *strcpy (char *, const char *) __attribute__ ((__pure__));
+__SIZE_TYPE__ strlen (const char *);
+void *malloc (__SIZE_TYPE__);
+
+char a[20];
+
+char *
+foo (void)
+{
+ __SIZE_TYPE__ b = strlen (a);
+ char *c = malloc (b);
+ return strcpy (c, a);
+}
diff --git a/gcc/testsuite/gcc.dg/pr71581.c b/gcc/testsuite/gcc.dg/pr71581.c
new file mode 100644
index 00000000000..d82eb1ed5c9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr71581.c
@@ -0,0 +1,24 @@
+/* PR middle-end/71581 */
+/* { dg-do compile } */
+/* { dg-options "-Wuninitialized" } */
+
+_Complex float
+f1 (void)
+{
+ float x;
+ return x; /* { dg-warning "is used uninitialized in this function" } */
+}
+
+_Complex double
+f2 (void)
+{
+ double x;
+ return x; /* { dg-warning "is used uninitialized in this function" } */
+}
+
+_Complex int
+f3 (void)
+{
+ int x;
+ return x; /* { dg-warning "is used uninitialized in this function" } */
+}
diff --git a/gcc/testsuite/gcc.dg/pr71685.c b/gcc/testsuite/gcc.dg/pr71685.c
new file mode 100644
index 00000000000..80e5c8f5902
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr71685.c
@@ -0,0 +1,6 @@
+/* PR c/71685 */
+/* { dg-do compile } */
+/* { dg-options "-std=gnu11" } */
+
+extern struct S v, s;
+struct S { int t; int p[]; } v = { 4, 0 };
diff --git a/gcc/testsuite/gcc.dg/spellcheck-options-12.c b/gcc/testsuite/gcc.dg/spellcheck-options-12.c
new file mode 100644
index 00000000000..b5e65e54a39
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/spellcheck-options-12.c
@@ -0,0 +1,7 @@
+/* Verify that we don't include -Wno- variants for options marked
+ with RejectNegative when considering hints for misspelled options
+ (PR driver/71651). */
+
+/* { dg-do compile } */
+/* { dg-options "-fno-stack-protector-explicit" } */
+/* { dg-error "unrecognized command line option .-fno-stack-protector-explicit.; did you mean .-fstack-protector-explicit.." "" { target *-*-* } 0 } */
diff --git a/gcc/testsuite/gcc.dg/torture/float128-cmp-invalid.c b/gcc/testsuite/gcc.dg/torture/float128-cmp-invalid.c
index 9d37ba25b6d..129ceeef6ff 100644
--- a/gcc/testsuite/gcc.dg/torture/float128-cmp-invalid.c
+++ b/gcc/testsuite/gcc.dg/torture/float128-cmp-invalid.c
@@ -1,7 +1,10 @@
/* Test for "invalid" exceptions from __float128 comparisons. */
-/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
+/* { dg-do run } */
/* { dg-options "" } */
+/* { dg-require-effective-target __float128 } */
+/* { dg-require-effective-target base_quadfloat_support } */
/* { dg-require-effective-target fenv_exceptions } */
+/* { dg-add-options __float128 } */
#include <fenv.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/torture/float128-div-underflow.c b/gcc/testsuite/gcc.dg/torture/float128-div-underflow.c
index f721e562b8a..dc284dec6dc 100644
--- a/gcc/testsuite/gcc.dg/torture/float128-div-underflow.c
+++ b/gcc/testsuite/gcc.dg/torture/float128-div-underflow.c
@@ -1,7 +1,10 @@
/* Test for spurious underflow from __float128 division. */
-/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
+/* { dg-do run } */
/* { dg-options "" } */
+/* { dg-require-effective-target __float128 } */
+/* { dg-require-effective-target base_quadfloat_support } */
/* { dg-require-effective-target fenv_exceptions } */
+/* { dg-add-options __float128 } */
#include <fenv.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/torture/float128-extend-nan.c b/gcc/testsuite/gcc.dg/torture/float128-extend-nan.c
index 60f9bbe9435..65dc520af7f 100644
--- a/gcc/testsuite/gcc.dg/torture/float128-extend-nan.c
+++ b/gcc/testsuite/gcc.dg/torture/float128-extend-nan.c
@@ -1,7 +1,10 @@
/* Test extensions to __float128 quiet signaling NaNs. */
-/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
+/* { dg-do run } */
/* { dg-options "-fsignaling-nans" } */
+/* { dg-require-effective-target __float128 } */
+/* { dg-require-effective-target base_quadfloat_support } */
/* { dg-require-effective-target fenv_exceptions } */
+/* { dg-add-options __float128 } */
#include <fenv.h>
#include <float.h>
diff --git a/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-2.c b/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-2.c
index 9990e190c60..b46acb39fd5 100644
--- a/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-2.c
+++ b/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-2.c
@@ -1,9 +1,12 @@
/* Test floating-point conversions. __float128 type with TImode: bug
53317. */
/* Origin: Joseph Myers <joseph@codesourcery.com> */
-/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
+/* { dg-do run } */
+/* { dg-require-effective-target __float128 } */
+/* { dg-require-effective-target base_quadfloat_support } */
/* { dg-require-effective-target int128 } */
/* { dg-options "" } */
+/* { dg-add-options __float128 } */
extern void abort (void);
extern void exit (int);
diff --git a/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-3.c b/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-3.c
index 944494d9bcc..fa6eb6b72bf 100644
--- a/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-3.c
+++ b/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-3.c
@@ -1,8 +1,11 @@
/* Test for correct rounding of conversions from __int128 to
__float128. */
-/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
+/* { dg-do run } */
+/* { dg-require-effective-target __float128 } */
+/* { dg-require-effective-target base_quadfloat_support } */
/* { dg-require-effective-target int128 } */
/* { dg-options "-frounding-math" } */
+/* { dg-add-options __float128 } */
#include <fenv.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode.c b/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode.c
index 8318f8ad8ae..493dee892b0 100644
--- a/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode.c
+++ b/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode.c
@@ -1,7 +1,10 @@
/* Test floating-point conversions. __float128 type with TImode. */
/* Origin: Joseph Myers <joseph@codesourcery.com> */
-/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
+/* { dg-do run } */
+/* { dg-require-effective-target __float128 } */
+/* { dg-require-effective-target base_quadfloat_support } */
/* { dg-options "" } */
+/* { dg-add-options __float128 } */
#include "fp-int-convert.h"
diff --git a/gcc/testsuite/gcc.dg/torture/pr71423.c b/gcc/testsuite/gcc.dg/torture/pr71423.c
new file mode 100644
index 00000000000..06a613f11fe
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr71423.c
@@ -0,0 +1,20 @@
+/* { dg-do run } */
+
+struct S1
+{
+ int f1:1;
+};
+
+volatile struct S1 b = { 0 };
+
+int
+main ()
+{
+ char c = b.f1;
+ b.f1 = 1;
+
+ if (b.f1 > -1 || c)
+ __builtin_abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr71452.c b/gcc/testsuite/gcc.dg/torture/pr71452.c
new file mode 100644
index 00000000000..8948d39fdaf
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr71452.c
@@ -0,0 +1,10 @@
+/* { dg-do run } */
+
+int main()
+{
+ _Bool b;
+ *(char *)&b = 123;
+ if (*(char *)&b != 123)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr71522.c b/gcc/testsuite/gcc.dg/torture/pr71522.c
new file mode 100644
index 00000000000..953c4c71100
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr71522.c
@@ -0,0 +1,27 @@
+/* { dg-do run } */
+
+#if __SIZEOF_LONG_DOUBLE__ == 16
+#define STR "AAAAAAAAAAAAAAA"
+#elif __SIZEOF_LONG_DOUBLE__ == 12
+#define STR "AAAAAAAAAAA"
+#elif __SIZEOF_LONG_DOUBLE__ == 8
+#define STR "AAAAAAA"
+#elif __SIZEOF_LONG_DOUBLE__ == 4
+#define STR "AAA"
+#else
+#define STR "A"
+#endif
+
+int main()
+{
+ long double d;
+ char s[sizeof d];
+
+ __builtin_memcpy(&d, STR, sizeof d);
+ __builtin_memcpy(&s, &d, sizeof s);
+
+ if (__builtin_strncmp (s, STR, sizeof s) != 0)
+ __builtin_abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr71606.c b/gcc/testsuite/gcc.dg/torture/pr71606.c
new file mode 100644
index 00000000000..b0cc26ac771
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr71606.c
@@ -0,0 +1,11 @@
+_Complex a;
+void fn1 ();
+
+int main () {
+ fn1 (a);
+ return 0;
+}
+
+void fn1 (__complex__ long double p1) {
+ __imag__ p1 = 6.0L;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp101.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp101.c
new file mode 100644
index 00000000000..cfca5396e63
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp101.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+int x = 1;
+
+int main ()
+{
+ int t = (1/(1>=x))>>1;
+ if (t != 0) __builtin_abort();
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "<bb 2>:\[\n\r \]*return 0;" "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr71259.c b/gcc/testsuite/gcc.dg/vect/pr71259.c
new file mode 100644
index 00000000000..eefa2433225
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr71259.c
@@ -0,0 +1,28 @@
+/* PR tree-optimization/71259 */
+/* { dg-do run } */
+/* { dg-options "-O3" } */
+/* { dg-additional-options "-mavx" { target avx_runtime } } */
+
+#include "tree-vect.h"
+
+long a, b[1][44][2];
+long long c[44][17][2];
+
+int
+main ()
+{
+ int i, j, k;
+ check_vect ();
+ asm volatile ("" : : : "memory");
+ for (i = 0; i < 44; i++)
+ for (j = 0; j < 17; j++)
+ for (k = 0; k < 2; k++)
+ c[i][j][k] = (30995740 >= *(k + *(j + *b)) != (a != 8)) - 5105075050047261684;
+ asm volatile ("" : : : "memory");
+ for (i = 0; i < 44; i++)
+ for (j = 0; j < 17; j++)
+ for (k = 0; k < 2; k++)
+ if (c[i][j][k] != -5105075050047261684)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/vect/pr71264.c b/gcc/testsuite/gcc.dg/vect/pr71264.c
new file mode 100644
index 00000000000..4f6381e323a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr71264.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_int } */
+
+typedef unsigned char uint8_t;
+typedef uint8_t footype __attribute__((vector_size(4)));
+
+void test(uint8_t *ptr, uint8_t *mask)
+{
+ footype mv;
+ __builtin_memcpy(&mv, mask, sizeof(mv));
+ for (unsigned i = 0; i < 16; i += 4)
+ {
+ footype temp;
+ __builtin_memcpy(&temp, &ptr[i], sizeof(temp));
+ temp ^= mv;
+ __builtin_memcpy(&ptr[i], &temp, sizeof(temp));
+ }
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr71823.c b/gcc/testsuite/gcc.dg/vect/pr71823.c
new file mode 100644
index 00000000000..079cde41ce4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr71823.c
@@ -0,0 +1,14 @@
+/* PR tree-optimization/71823 */
+/* { dg-do compile } */
+/* { dg-additional-options "-mfma" { target i?86-*-* x86_64-*-* } } */
+
+float a[4], b[4];
+
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 4; ++i)
+ b[i] = __builtin_fma (1024.0f, 1024.0f, a[i]);
+ return 0;
+}