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

    <tr>
        <th>Summary</th>
        <td>
            LLDB printed an incorrect value for a program under - O2
        </td>
    </tr>

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

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

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

<pre>
    The program is generated by csmith and compiled by gcc at the - O2 level. The value printed by gdb is 0, which is the correct value, while lldb prints different values. Compile at the optimization level of - O0, and the printed values for gdb and lldb are both 0.
I'm curious, is this a bug should be fixed?

- gdb commands:
(gdb)b 84
(gdb)r
(gdb)p g_13[1][1]
$1 = 0

- The lldb used the same command.
(lldb) p g_13[1][1]
(int32_t) $0 = 0

gcc version:gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
lldb version:lldb version 15.0.7
gdb version:GNU gdb (Ubuntu 9.2-0ubuntu1~20.04.1) 9.2
platform:Ubuntu 20.04

csmith_h=$HOME/csmith/install/include
gcc  random_46.c  -I $csmith_h  -O2 -o random_46 -g 

[random_46.zip](https://github.com/llvm/llvm-project/files/15398150/random_46.zip)



</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUVE2PpDYQ_TXmUgKZMvTgA4ed7ZAdaZM-JLvXkQ0GHBncss1sdg_57ZFN9_T0RIq0F6C-3ntV2CW819OqVEvqR1IfM7GF2br26fT19PXTH5m0w_f2z1nB2dnJiQW0h0mtyomgBpDfofeLDjOIdYDeLmdtdvfU9yAChFlBDicEo16UKSAivQizRTy9XiCmQUZYSvAjfJt1P0crVvbWOdWHveISNQqMGeRe72HQ46icWi9JvoCPu4oruz0HvegfImi77irAjlFToouyw3xTs4PAaF1SFcOJTTgF0oYZaEHokdAPTwQfFug3p-3mI1KSrD0IkNsEfrabGUAqGPXfaiCs28v2Z57Ae7ssYh08YRc3wWYaJEEuoaneudw7-wzTc8lI_ViS-nh9XVKqEgg7Ar2njKNPvWxe7U17sairiuIVP-YQ5PB_DI1eA8PnEPMIVvS_fPH_vyjntV0JSxbB5ovc1rABL6qC5uWWrPIfpAWtCoxYKbIDJKk3hLcmlHVBi4cL0V3ar79_SbN9S4Y5vacqdyrcAc5GhNG6hbAPl5KU9baZ_Yw_z4QdCVafTr_9QrDbnQQ7vfogjElfvdkGdZsAOLEOdnmuDkUPkD_FYV3BAPITQm5vOZBP8JaW1I-3-h_6HH8ANnMI53RmsCPYTTrMmyx6uxDsjHm5vvKzs3-pPhDsRm2UJ9iVNeNNWVOC3T0s8jvW9MyGlg2ccZGptnwoD6xmD5xnc8ukYHxokDeSluww9BVtxDgKKWs60rHOdIsUK1oj0qo-MF6MXCqKlWI154emQVJRtQhtiqizsG7KtPebajlyzjIjpDI-bSPEVX2DFCSIcTm5NvUmt8mTihrtg7-hBB2Maj9_Pj6-Xmexgl7vtki62uJ1m23roFzaUNnmTPvTs03i4nCT-H8DAAD___qVnVU">