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

    <tr>
        <th>Summary</th>
        <td>
            [flang][OpenMP][debug] Invalid debug locations cause verification failures.
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            flang
      </td>
    </tr>

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

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

<pre>
    Consider the following program.

```
program test
  implicit none
  call fn()

contains
  subroutine fn()
    integer v

    !$omp parallel private(v)
      v = 1
      !$omp target
        v = v + 1
      !$omp end target
    !$omp end parallel
  end subroutine fn
end program test
```
when compiled with the following command

`flang -fc1 -triple x86_64-unknown-linux-gnu -emit-llvm-bc -debug-info-kind=standalone -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa -O0` 

fails with this error.

```
inlinable function call in a function with debug info must have a !dbg location
  call void @__omp_offloading_10303_14e985b__QFPfn_l11(ptr %omp.private.alloc)
```

</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxsU9uOpDgM_ZrwYlEKAerywEPNlkrah9XMfgEKxIB3goOSQM_-_YpLd3WvRkqpwrFPdHxs6xCoZ8RKlN-EUrohMwilRPlI9BwH56sNShpn_q3-cBzIoIc4IHTOWvdG3MPkXe_1eBLyvp6zPI68HxGIGKKQdwAaJ0stRWDHuCGtthY6Fuoq1G1_oXUcNXHY4mFuvJsjMX7OAgAgjtijh2VnrZBQmVCFGyeYtNfWooXJ06IjCnVdXlSABUT-gOzj-8WM2vcYPwLvqQsI9e23BGTzlfQ19K5kC67A14rkfUv6atRnD98GZGjdOJFFA28Uh__Z37px1Gw-3O-s5h7Srs0gjZ4mi_Dreq7PRTrzT3ZvnFri-Vfa8wwpjhRTa5cxbVpIDTZznxJ3Lv1JbET-CFGz0dYxQtq5CXmcPi7pXnUQ-UOPpm851aNZf0PQkH5f9cOuqtNkw7t2CoDeO_-beSG2xLqxCN3MbSTH-3wQg35B2zubVFilwjiHCINeEPTqvWl6sK7Va-5rxBZHBkQh69qNU-26zjptiPs6k7nM66zA27Vs6vrv54-Oa5tlQl2n6EGo0o3T6Rijk7bWtcekfhKemCo3t_ymE6yyS5md85u8ZMlQdcXtIvMMr_J87c7y0tzai84z3ZhctkplCVVKqlJeZJEVqsiz0y2_XJtCYZFrleVGikLiqMme1i6dnO8TCmHGKisu8pwnVjdow7G-W-uP9fXV3ta5D6KQlkIMryciRbvt_M4oH6L89n1C_uvHft_cFeUD_uRFWzKH3e-2Bmj1HBAW9NTRjsHa5NljOCWzt9UQ4xREfhfqKdSzpzjMzal1o1DPVcXxl07e_YNtFOq5VRWEeh6FLZX6LwAA__8NmXHE">