]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR middle-end/89002
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 28 Jan 2019 22:34:32 +0000 (22:34 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 28 Jan 2019 22:34:32 +0000 (22:34 +0000)
* gimplify.c (gimplify_omp_for): When adding OMP_CLAUSE_*_GIMPLE_SEQ
for lastprivate/linear IV, push gimplify context around gimplify_assign
and, if it needed any temporaries, pop it into a gimple bind around the
sequence.

* testsuite/libgomp.c/pr89002.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268346 138bc75d-0d04-0410-961f-82ee72b054a4

libgomp/testsuite/libgomp.c/pr89002.c

index b66fada836fa696a315505e15fe61d338708c994..6d1b16405f2233b7e468ca8cd44e97ba43f66dad 100644 (file)
@@ -41,46 +41,3 @@ main ()
     abort ();
   return 0;
 }
-/* PR middle-end/89002 */
-
-extern void abort (void);
-
-int
-foo (int x)
-{
-  int a;
-  int *p = &a;
-
-#pragma omp taskloop lastprivate (a)
-  for (a = 0; a < x; ++a)
-    ;
-  return *p;
-}
-
-int
-bar (int x)
-{
-  int a;
-  int *p = &a;
-
-#pragma omp parallel
-#pragma omp single
-#pragma omp taskloop lastprivate (a)
-  for (a = 0; a < x; ++a)
-    ;
-  return *p;
-}
-
-int
-main ()
-{
-#pragma omp parallel
-#pragma omp single
-  {
-    if (foo (4) != 4)
-      abort ();
-  }
-  if (bar (6) != 6)
-    abort ();
-  return 0;
-}