Merge from trunk
[official-gcc.git] / gcc / testsuite / g++.dg / vect / pr60023.cc
blob78f325e6f7b0d3311d5ca98ba4d9ea4dba2ab84e
1 // PR tree-optimization/60023
2 // { dg-do compile }
3 // { dg-additional-options "-O3 -std=c++11 -fnon-call-exceptions" }
4 // { dg-additional-options "-mavx2" { target { i?86-*-* x86_64-*-* } } }
6 struct A { A (); ~A (); };
8 void
9 f1 (int *p, int *q, int *r) noexcept (true)
11 int i;
12 for (i = 0; i < 1024; i++)
13 if (r[i])
14 p[i] = q[i] + 1;
17 void
18 f2 (int *p, int *q, int *r)
20 int i;
21 for (i = 0; i < 1024; i++)
22 if (r[i])
23 p[i] = q[i] + 1;
26 void
27 f3 (int *p, int *q) noexcept (true)
29 int i;
30 for (i = 0; i < 1024; i++)
31 p[i] = q[i] + 1;
34 void
35 f4 (int *p, int *q)
37 int i;
38 for (i = 0; i < 1024; i++)
39 p[i] = q[i] + 1;
42 void
43 f5 (int *p, int *q, int *r) noexcept (true)
45 int i;
46 A a;
47 for (i = 0; i < 1024; i++)
48 if (r[i])
49 p[i] = q[i] + 1;
52 void
53 f6 (int *p, int *q, int *r)
55 int i;
56 A a;
57 for (i = 0; i < 1024; i++)
58 if (r[i])
59 p[i] = q[i] + 1;
62 void
63 f7 (int *p, int *q) noexcept (true)
65 int i;
66 A a;
67 for (i = 0; i < 1024; i++)
68 p[i] = q[i] + 1;
71 void
72 f8 (int *p, int *q)
74 int i;
75 A a;
76 for (i = 0; i < 1024; i++)
77 p[i] = q[i] + 1;
80 // { dg-final { cleanup-tree-dump "vect" } }