diff options
author | Cesar Philippidis <cesar@codesourcery.com> | 2018-04-12 06:15:45 -0700 |
---|---|---|
committer | Cesar Philippidis <cesar@gcc.gnu.org> | 2018-04-12 06:15:45 -0700 |
commit | 2e5efa6760314aac101b63d1a7742cff5f5e650f (patch) | |
tree | b8576600c7c102a8375ae41777eabe324a6b4f07 /gcc/omp-expand.c | |
parent | c1566f8942f107774fbe0d41cc5de641175043e7 (diff) | |
download | gcc-2e5efa6760314aac101b63d1a7742cff5f5e650f.zip gcc-2e5efa6760314aac101b63d1a7742cff5f5e650f.tar.gz gcc-2e5efa6760314aac101b63d1a7742cff5f5e650f.tar.bz2 |
re PR middle-end/84955 (Incorrect OpenACC tile expansion)
PR middle-end/84955
gcc/
* lto-streamer-out.c (output_function): Fix CFG loop state before
streaming out.
* omp-expand.c (expand_oacc_for): Handle calls to internal
functions like regular functions.
libgomp/
* testsuite/libgomp.oacc-c-c++-common/pr84955.c: New test.
* testsuite/libgomp.oacc-fortran/pr84955.f90: New test.
Co-Authored-By: Richard Biener <rguenther@suse.de>
From-SVN: r259346
Diffstat (limited to 'gcc/omp-expand.c')
-rw-r--r-- | gcc/omp-expand.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/omp-expand.c b/gcc/omp-expand.c index bb20490..c7d30ea 100644 --- a/gcc/omp-expand.c +++ b/gcc/omp-expand.c @@ -5439,6 +5439,14 @@ expand_oacc_for (struct omp_region *region, struct omp_for_data *fd) split->flags ^= EDGE_FALLTHRU | EDGE_TRUE_VALUE; + /* Add a dummy exit for the tiled block when cont_bb is missing. */ + if (cont_bb == NULL) + { + edge e = make_edge (body_bb, exit_bb, EDGE_FALSE_VALUE); + e->probability = profile_probability::even (); + split->probability = profile_probability::even (); + } + /* Initialize the user's loop vars. */ gsi = gsi_start_bb (elem_body_bb); expand_oacc_collapse_vars (fd, true, &gsi, counts, e_offset); |