Commit 0a734553 by Jakub Jelinek Committed by Jakub Jelinek

re PR middle-end/81052 (ICE in verify_dominators, at dominance.c:1184)

	PR middle-end/81052
	* omp-low.c (diagnose_sb_0): Handle flag_openmp_simd like flag_openmp.
	(pass_diagnose_omp_blocks::gate): Enable also for flag_openmp_simd.

	* c-c++-common/pr81052.c: New test.

From-SVN: r250847
parent 96715b4b
2017-08-03 Jakub Jelinek <jakub@redhat.com>
PR middle-end/81052
* omp-low.c (diagnose_sb_0): Handle flag_openmp_simd like flag_openmp.
(pass_diagnose_omp_blocks::gate): Enable also for flag_openmp_simd.
2017-08-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> 2017-08-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
* tree-vrp.h: Add include guard. * tree-vrp.h: Add include guard.
......
...@@ -9083,7 +9083,7 @@ diagnose_sb_0 (gimple_stmt_iterator *gsi_p, ...@@ -9083,7 +9083,7 @@ diagnose_sb_0 (gimple_stmt_iterator *gsi_p,
} }
if (kind == NULL) if (kind == NULL)
{ {
gcc_checking_assert (flag_openmp); gcc_checking_assert (flag_openmp || flag_openmp_simd);
kind = "OpenMP"; kind = "OpenMP";
} }
...@@ -9343,7 +9343,7 @@ public: ...@@ -9343,7 +9343,7 @@ public:
/* opt_pass methods: */ /* opt_pass methods: */
virtual bool gate (function *) virtual bool gate (function *)
{ {
return flag_cilkplus || flag_openacc || flag_openmp; return flag_cilkplus || flag_openacc || flag_openmp || flag_openmp_simd;
} }
virtual unsigned int execute (function *) virtual unsigned int execute (function *)
{ {
......
2017-08-03 Jakub Jelinek <jakub@redhat.com>
PR middle-end/81052
* c-c++-common/pr81052.c: New test.
2017-08-03 Tom de Vries <tom@codesourcery.com> 2017-08-03 Tom de Vries <tom@codesourcery.com>
* gcc.dg/pr56727-2.c: Require alias. * gcc.dg/pr56727-2.c: Require alias.
......
/* PR middle-end/81052 */
/* { dg-do compile } */
/* { dg-options "-fopenmp-simd -O2" } */
int
foo (int x, int y)
{
int i;
#pragma omp simd
for (i = x; i < y; ++i)
return 0; /* { dg-error "invalid branch to/from OpenMP structured block" } */
return 1;
}
#ifdef __cplusplus
template <typename T>
T
bar (T x, T y)
{
T i;
#pragma omp simd
for (i = x; i < y; ++i)
return 0; /* { dg-error "invalid branch to/from OpenMP structured block" "" { target c++ } } */
return 1;
}
int x = bar (1, 7);
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment