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

    <tr>
        <th>Summary</th>
        <td>
            [flang][omp2012] Redundant explicit save in presence of global SAVE statement
        </td>
    </tr>

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

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

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

<pre>
    For the following source:

```f90
! ERROR: flang-new -c -o rc01.o -fopenmp -ffree-form rc01.f90
! WARNING: gfortran -c -o rc01.o -fopenmp -ffree-form rc01.f90


module sample

        type random_type
        integer   ::  x = 0
       real      ::   y = 0.
        end type random_type

     save
     
     integer, parameter :: param=100
     type(random_type),save :: param_list(100)

end module sample

```

The following semantic error is observed in case of `flang-new`:

```
error: Semantic errors in rc01.f90

./rc01.f90:15:32: error: Explicit SAVE of 'param_list' is redundant due to global SAVE statement

       type(random_type),save :: param_list(100)

                                 ^^^^^^^^^^

./rc01.f90:12:6: Global SAVE statement

       save
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJytU02PmzAQ_TVwGSUyZknCgUPaJKseupXSqj2uDB6IK4ORbfbj33dMPpaou9tWKhgz2OM3b94MpZHPxc5Y8AeE2mhtHlXXgDODrTBK1xHbROw8L9hx1Dk7rfAEtvv9lz15Qq1F18w6fIRZBTMDtmLJ3MCsNj12bU9GbRHp07bHvSuYH-v93ae72wDUkIu3ovt3nMncGjloBCfaXuP1du6fewQKIE17H-zjBpwu1Xls0JIV8ic-8ETWBtiVm0Whj9bZC56PbvNLHOwkvB5rAuXEw5TAxDwRifhH6IUVLXpidYo2LlC4hE1pjQH4ahqO53Q-xLg6ea-V8-QZjpPHhFPg_LZ25w6YLn677hxsRedVBWgttZVyYEqH9gEl5QOVcAimhtBE53YJcG802olSQArUv15huwD4WgPMI767rKfrJKMp5QHggrR96rWqlIev6-_bkRBfToVZBuIW5dBJighyQPAGGm1Kqvp4xnnhscXO_1bQ_1IG-NMVZdv3xjtyBCUWgcLtX6bz0qGXwsSySGWe5iL2ymssouzDWM8o25Bp2p4zipNtYH_REM-SjypQ6XqLDrtq7IdXlY0Hq4uD970LmvEdjUb5w1DOK9PSh9YP59est-YnVqTlTjk3oCMjWzCWxoeiTmpcCZmseLlKb9KyEpzJJMnKlC9vViuMtShRu5BDxPkxjXRdW0O_XydpifKIVcEZ52yRpCyjO5_LUuYVQ_rJl1UmWBXdMOpOpeeBztzYJrbFyKwcGkebodLuZVM4p5oOR-UCvhj8wdjiTrXKHT7TY0U8ZlKMafwC4Z6hBg">