2014-01-30 Alangi Derick <alangiderick@gmail.com>
[official-gcc.git] / gcc / testsuite / g++.dg / vect / pr33426-ivdep-4.cc
bloba193295bb5c613806831638fc8b6b3058e547e0c
1 /* { dg-do compile } */
2 /* { dg-require-effective-target vect_float } */
3 /* { dg-additional-options "-std=c++11 -O3 -fopt-info-vec-optimized -fdump-tree-original -fdump-tree-gimple" } */
5 /* PR other/33426 */
6 /* Testing whether #pragma ivdep is working. */
8 #include <vector>
10 template<class T, class T2>
11 void Loop(T *b, T2 c) {
12 #pragma GCC ivdep
13 for (auto &i : *b) {
14 i *= *c;
18 void foo(std::vector<int> *ar, int *b) {
19 Loop<std::vector<int>, int*>(ar, b);
22 /* { dg-message "loop vectorized" "" { target *-*-* } 0 } */
23 /* FIXME: dg-bogus " version\[^\n\r]* alias" "" { target *-*-* } 0 */
24 /* { dg-final { cleanup-tree-dump "vect" } } */
26 /* { dg-final { scan-tree-dump-times "ANNOTATE_EXPR " 1 "original" } } */
27 /* { dg-final { cleanup-tree-dump "original" } } */
28 /* { dg-final { scan-tree-dump-times "ANNOTATE " 1 "gimple" } } */
29 /* { dg-final { cleanup-tree-dump "gimple" } } */