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

    <tr>
        <th>Summary</th>
        <td>
            [Flang][OpenMP] Compilation error when specifying do-variable of integer*1 or integer*2 in lastprivate clause
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          ohno-fj
      </td>
    </tr>
</table>

<pre>
    ```
Version of flang-new : 18.0.0(0fe86f9c518fb1296bba8d66ce495f9dfff2c435)
```

If a `do-variable` of `integer*1` or `integer*2` is specified in `lastprivate` clause, a compilation error occurs.  
Compilation ends normally in the following cases:
- do not specify `lastprivate` clause in `parallel do` construct or
- do not specify the compilation option `-fopenmp`

The following are the test program, Flang-new, Gfortran and ifort compilation result.

sngtomp014_31.f90:
```fortran
program main
  call aaaaa
  print *,'pass'
end program main

subroutine aaaaa
 integer*1 i1
  i1=0
!$omp parallel do lastprivate(i1)
  do i1=1,8
  enddo
!$omp endparalleldo
end subroutine aaaaa
```

```
$ flang-new -fopenmp sngtomp014_31.f90
error: loc("/work/sngtomp014_31.f90":9:7): 'fir.store' op store value type must match memory reference type
error: verification of lowering to FIR failed
```

```
$ gfortran -fopenmp sngtomp014_31.f90
$
```

```
$ ifort -qopenmp sngtomp014_31.f90 -diag-disable=10448
$
```

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUVU1v4zYQ_TX0ZWCDGn0ffPDacLGHokVR9FpQ4lDmliJVkkqQf19QllMl2bRYw7DMIfnmzdeTCEEPlujIyi-svOzEHG_OH93Nur36tuucfDmyiq9ffmH89Af5oJ0Fp0AZYYe9pWdg-Qmy5sAPnGHDFTWVavsya1SXYVt1nWhkVfVUtKVqpVIK-yIvGbZ3yHce7r9fFQhgFZdu_yS8Fp0hVvHkllVc20gDeYanbDH6t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