forked from gcc-mirror/gcc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* omp-low.c (lower_rec_input_clause): For reduction with placeholder of references to constant size types in simd loops, defer emitting initializer for the new_var, emit it later on only if not using SIMD arrays for it. * g++.dg/gomp/pr59150.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205411 138bc75d-0d04-0410-961f-82ee72b054a4
- Loading branch information
jakub
committed
Nov 26, 2013
1 parent
33ee4d7
commit 09d1c20
Showing
4 changed files
with
82 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// PR middle-end/59150 | ||
// { dg-do compile } | ||
// { dg-options "-O -fopenmp-simd -fno-tree-ccp -fno-tree-copy-prop -fno-tree-dce" } | ||
|
||
#pragma omp declare reduction (foo: int: omp_out += omp_in) initializer (omp_priv = 0) | ||
|
||
int | ||
foo () | ||
{ | ||
int i, v, &u = v; | ||
#pragma omp simd reduction (foo:u) | ||
for (i = 0; i < 1024; i++) | ||
u = i; | ||
return u; | ||
} | ||
|
||
int | ||
bar () | ||
{ | ||
int i, v, &u = v; | ||
#pragma omp simd reduction (foo:u) safelen(1) | ||
for (i = 0; i < 1024; i++) | ||
u = i; | ||
return u; | ||
} |