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

    <tr>
        <th>Summary</th>
        <td>
            [LLDB] the value of the variable is incorrect
        </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>
    ```c
static uint64_t  func_25(int64_t p_26)
{ /* block id: 9 */
    int32_t *l_44 = &g_45[0];
    uint8_t *l_47 = &g_4;
    uint8_t **l_46 = &l_47;
    int32_t l_50 = 0x6EF5427EL;
    int32_t l_55[10][7][3] = {{{0xEC28D216L,5L,0x28DFE901L},{1L,1L,(-1L)},{0x78C3A3B2L,0xD7BF5F1EL,0x28DFE901L},{0xF941663BL,1L,0xF941663BL},{0xEC28D216L,0x78C3A3B2L,(-1L)},{0xA3C8FCBDL,0xF941663BL,0xF941663BL},{(-1L),0xEC28D216L,0x28DFE901L}},{{0x72C6516EL,0xA3C8FCBDL,(-1L)},{(-1L),(-1L),0L},{0xA3C8FCBDL,0x72C6516EL,0x77E9FB13L},{0xEC28D216L,(-1L),0xEC28D216L},{0xF941663BL,0xA3C8FCBDL,1L},{0x78C3A3B2L,0xEC28D216L,0xEC28D216L},{1L,0xF941663BL,0x77E9FB13L}},{{0xD7BF5F1EL,0x78C3A3B2L,0L},{1L,1L,(-1L)},{0x78C3A3B2L,0xD7BF5F1EL,0x28DFE901L},{0xF941663BL,1L,0xF941663BL},{0xEC28D216L,0x78C3A3B2L,(-1L)},{0xA3C8FCBDL,0xF941663BL,0xF941663BL},{(-1L),0xEC28D216L,0x28DFE901L}},{{0x72C6516EL,0xA3C8FCBDL,(-1L)},{(-1L),(-1L),0L},{0xA3C8FCBDL,0x72C6516EL,0x77E9FB13L},{0xEC28D216L,(-1L),0xEC28D216L},{0xF941663BL,0xA3C8FCBDL,1L},{0x78C3A3B2L,0xEC28D216L,0xEC28D216L},{1L,0xF941663BL,0x77E9FB13L}},{{0xD7BF5F1EL,0x78C3A3B2L,0L},{1L,1L,(-1L)},{0x78C3A3B2L,0xD7BF5F1EL,0x28DFE901L},{0xF941663BL,1L,0xF941663BL},{0xEC28D216L,0x78C3A3B2L,(-1L)},{0xA3C8FCBDL,0xF941663BL,0xF941663BL},{(-1L),0xEC28D216L,0x28DFE901L}},{{0x72C6516EL,0xA3C8FCBDL,(-1L)},{(-1L),(-1L),0L},{0xA3C8FCBDL,0x72C6516EL,0x77E9FB13L},{0xEC28D216L,(-1L),0xEC28D216L},{0xF941663BL,0xA3C8FCBDL,1L},{0x78C3A3B2L,0xEC28D216L,0xEC28D216L},{1L,0xF941663BL,0x77E9FB13L}},{{0xD7BF5F1EL,0x78C3A3B2L,0L},{1L,1L,(-1L)},{0x78C3A3B2L,0xD7BF5F1EL,0x28DFE901L},{0xF941663BL,1L,0xF941663BL},{0xEC28D216L,0x78C3A3B2L,(-1L)},{0xA3C8FCBDL,0xF941663BL,0xF941663BL},{(-1L),0xEC28D216L,0x28DFE901L}},{{0x72C6516EL,0xA3C8FCBDL,(-1L)},{(-1L),(-1L),0L},{0xA3C8FCBDL,0x72C6516EL,0x77E9FB13L},{0xEC28D216L,(-1L),0xEC28D216L},{0xF941663BL,0xA3C8FCBDL,1L},{0x78C3A3B2L,0xEC28D216L,0xEC28D216L},{1L,0xF941663BL,0x77E9FB13L}},{{0xD7BF5F1EL,0x78C3A3B2L,0L},{1L,1L,(-1L)},{0x78C3A3B2L,0xD7BF5F1EL,0x28DFE901L},{0xF941663BL,1L,0xF941663BL},{0xEC28D216L,0x78C3A3B2L,(-1L)},{0xA3C8FCBDL,0xF941663BL,0xF941663BL},{(-1L),0xEC28D216L,0x28DFE901L}},{{0x72C6516EL,0xA3C8FCBDL,(-1L)},{(-1L),(-1L),(-1L)},{0xF941663BL,0x77E9FB13L,(-1L)},{0xD7BF5F1EL,5L,0xD7BF5F1EL},{0x72C6516EL,0xF941663BL,0L},{0xEC28D216L,0xD7BF5F1EL,0xD7BF5F1EL},{0L,0x72C6516EL,(-1L)}}};
 int64_t *l_68 = (void*)0;
    int64_t *l_69 = (void*)0;
    int32_t l_70 = 0x08C81983L;
    uint8_t *l_93 = (void*)0;
    int32_t *l_403 = &g_318[4][1];
    uint16_t *l_404 = &g_196;
    uint16_t *l_415 = (void*)0;
    uint16_t *l_416 = (void*)0;
    uint16_t *l_417 = &g_200;
    uint32_t *l_418 = &g_10;
    uint32_t l_419 = 4UL;
 int i, j, k;
    (*g_400) = func_27(((((*l_46) = func_33(func_39(((*l_44) = g_8), l_46, (((safe_add_func_int16_t_s_s(l_50, (safe_lshift_func_uint64_t_u_s(((safe_div_func_uint32_t_u_u((l_55[4][4][2] = l_50), ((safe_div_func_uint32_t_u_u(0x828E8BF3L, 0xE6B711A4L)) ^ (safe_mul_func_int64_t_s_s((l_70 ^= (safe_lshift_func_uint16_t_u_u((safe_mul_func_int32_t_s_s(l_50, (-1L))), ((safe_div_func_int32_t_s_s(((safe_lshift_func_uint32_t_u_u((((g_15 ^ g_6) < 0x6B3EL) , 4294967295UL), 31)) , 0x6C7BFB9EL), p_26)) , 65535UL)))), g_15))))) & g_18), 60)))) == (-5L)) ^ l_50), &l_47), g_8, l_50, (*g_84), l_50)) == l_93) , 0xEC46L), g_18, g_10, g_10, &l_50);
    (*g_136) &= ((safe_mul_func_uint16_t_u_u((((*l_403) = ((*l_44) = p_26)) , ((0x2C60L || (((g_274 &= p_26) , ((*l_404) |= 0xC69DL)) , (g_4 ^ 0L))) , (safe_lshift_func_int32_t_s_u(p_26, l_50)))), (((safe_div_func_int8_t_s_s((g_186[3] ^= (((*l_418) |= (safe_mul_func_uint16_t_u_u(((*l_417) |= ((safe_mod_func_int32_t_s_s((-9L), p_26)) | 1UL)), 0x7476L))) ^ p_26)), l_419)) , l_55[1][4][2]) < p_26))) , l_50);
    (*g_136) = p_26;
    return p_26;
}
```
This program is generated by csmith. Using clang-15 to compile the program at the optimization level of O1, the breakpoint can be stopped at line 128.This line is used to update the variable g_400.
```
(lldb) b 128
(lldb) r
(lldb) p l_55[0][0][0]
(int32_t) $0 =0
```
The program compiled with O0 printed the correct values.
```
(lldb) b 128
(lldb) r
(lldb) p l_55[0][0][0]
(int32_t) $0 = -332869098
```
It is worth noting that, GDB shows here that the variable l_55 has been optimized, but in reality, llvm-dwarfdump is used to print dwarf information, and the variable l_55 has a location attribute.

clang random_69.c  -I $csmith_h -O1 -o  random_69_1_clang.o -g -w

lldb version 15.0.7
clang version 15.0.7
GNU gdb (GDB) 13.2
[test_case.zip](https://github.com/user-attachments/files/15509283/test_case.zip)


</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsWUuPozoW_jXO5iiRH2DMIosij56WounFTN8t4uEkvk0gAlNVfX_9yDYQU0n69ixGsykJQcX-zvs7Th2SdZ061VKuUZigcLvIen1u2vXXb398--Mf_1rkTflzjTh2V4HwFuGXTmdaFdCrWvMg1QDHvi5SGiIqxqVrSjmiscOjKAFE94i-QF41xQ9QJWIvEAOiL2bdggAAVK0ZTbVZr9IgAMS2gCg_pUGIwgSjcItYcoMbB8QEjzz4M5hD8hFppGbQ0YEqDbEF4Xe-24cBjXaHZ0DjGrG-hUnkHgyFW2cjStyF33cbKraU8AOim9Dc8DsV2_0uxuSAoi2iGxQlxGzYG6Jiaf6Ipz38HokNe2EJddLbKNmHe7J7pgu_7-OAcM6SSam_dIP5ns2NPHLihW3EfpNsP-p7rP2mwezPLc1cngRsoHTDQ8KH0HyL9x75FmbWDk-dnquPol28Twh7lpJnITzO89zWrBzz8s1zca_2rmB3vs5SNmfDzNQnvT7p9UmvT3p90uuTXp_0-qTX_55ej3x_VqvHaD_B4cece1WZOTsz8TzL8-I9UHvfCDMX3TVNA-PIY2cLLobZQrw2qrQTR4w_Tg4ePP4N-DBoRONEgsVGkFiww_NhKGa_q9dNRJjdhidGBAqTwE0y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