<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/64728>64728</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Bug in Support for Code Generation of loop bind clause : Before Mapping directive needs to check the parent region.
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          SunilKuravinakop
      </td>
    </tr>
</table>

<pre>
    In https://reviews.llvm.org/D144634 : Support for Code Generation of loop bind clause 
before mapping a directive to the new directive there is a need to check if the parent directive/region is proper for the new mapped directive. e.g.
#pragma omp parallel for
for () {
  #pragma omp loop bind(parallel)
  for() {}
}.

After mapping omp loop bind(parallel) to omp for the above example becomes:
#pragma omp parallel for
for () {
  #pragma omp for
  for() {}
}.
However, it is illegal to have a for region within another for region.
Rules in the OpenMP Spec “Nesting of Regions” need to be taken into account before mapping.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysVE2PnDAM_TXhYi0Cwwxw4DCz02mrattq9xcEMJBuSKIkMO2_r8J87V5aVeoFpNh-ec_2C3dODIqoZps92xwiPvtR2_plVkJ-mS1fhOKv2kSN7n7VnxWM3hvHsh3DI8OjpUXQycVSLlOs7cDweEjzfJvlwLIdvMzGaOuh1xYedUfwkRRZ7oVWoHuQWhtohOqglXx2BCw5sGTXUK8twcSNEWoADp2w1HqxEHgNfiRQdHp7OJIlEA44KKIuJLUjta8g-jXbcEvK3wtW3kPgIBwYqw3ZleEVOVxM3T0_BoqH-MyNYWYsHyYOejIBmUtJMpSf4wGHYcmwAlbsz2cA76tushmWVwSG1TU5YN0RisPl4uJwpbB-d70ne-vRH2BDO0L4qpA3eiGgn3wykqChVk-0DvS_6bsl_13LJ32ihSzDRxA-jENISQOXgfTIFwK-8r6M6yT8KBRwpcPI30QuaM-zJAdCrTq_GVJP3-HFUAvsA7IyYdXjV3J-7VcPz2ulu4YOt91pCDx_JQVCeQ28bfWsPLxfyjjq6qyrsopHVKfbCtMyS8osGuuibStETLuOtpgSUpWXTdVQSmmGCU8iUWOCWVKm2zTZpJjF_YbzNOHptt8UeYMFyxOauJA3U0XCuZnqbV5gGUnekHSrWxHDtq5BhhjMa-tQ89DMg2N5IoXzd2tGXnhJ9X4eQof-2ZnZDvbnFjxddu5uwNA5d7fdG89dxhPNVtbvX45B-HFu4lZPDI-B4-X3YKz-Qa1neFyVOYbHVfnvAAAA__9uloIE">