[Bug fortran/101535] ICE in lookup_decl, at omp-low.c:412

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jul 20 17:05:51 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101535

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
void
foo (void)
{
  int a = 1, i;
  #pragma omp target data map(to:a)
  #pragma omp for lastprivate(i)
  for (i = 1; i < 2; i++)
    ;
}

ICEs too.  With the target data directive commented out it is diagnosed:
lastprivate variable ‘i’ is private in outer context
so I think we should make sure we don't consider the target data affecting it
in any way.


More information about the Gcc-bugs mailing list