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

    <tr>
        <th>Summary</th>
        <td>
            [clang][SmallVector] SmallVector unable to grow. Requested capacity (4294967296) is larger than maximum value for size type (4294967295)
        </td>
    </tr>

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

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

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

<pre>
    This bug was found by Azul FuzzGen fuzzer for CPP.

Godbolt link: https://godbolt.org/z/a59aEE1da

Run clang -O3 (x86_64) on the test
[test.cpp.txt](https://github.com/llvm/llvm-project/files/8589072/test.cpp.txt)
 
Failure looks like:
```Execution time: 24220.0 seconds ./gen_02065.cpp
./gen_02065.cpp:306:66: warning: shift count >= width of type [-Wshift-count-overflow]
 switch (abs((((((int64_t)int64_tVar_49)  >=  (int64_tVar_53)))  >>  46 ))) {
                                                                 ^   ~~
./gen_02065.cpp:413:36: warning: unsequenced modification and access to 'uint16_tVar_74' [-Wunsequenced]                                                                                                                                       if ((uint16_t)(((((uint16_tVar_74++) - (true))) * ((uint16_tVector_73.empty() ? (((uint16_t)VECTORuint16_tRefIterator_76) - (uint16_tVar_74)) : uint16_tVector_73.at(((uint16_tVector_73.empty() ? uint16_tVar_74 : uint16_tVector_73[(uint16_tVar_74) % uint16_tVector_73.size()] )) % uint16_tVector_73.size())))))) {                                                                                                                                                                                                   ^                                                                                          ~
./gen_02065.cpp:506:167: warning: unsequenced modification and access to 'uint16_tVar_90' [-Wunsequenced]
uint16_tVector_83.push_back( max((uint16_t)( max((uint16_t)((uint16_t)uint16_tVar_90), (uint16_t)(((uint16_tVar_90) - (uint16_tVar_90)))) ), (uint16_t)(uint16_tVar_90--)) );
                                                                      ~~~~~~~~~~~~~~                                                                                  ^
./gen_02065.cpp:794:149: warning: taking the absolute value of unsigned type 'bool' has no effect [-Wabsolute-value]
int8_tVar_146 *= ((((int8_t)(((int8_tVar_146) + (int8_tVar_146)))) ? ((false) ? ((int8_t)int8_tVar_146) : (int8_tVar_146)) : (int8_tVar_146))  >=  (abs(true)));
                                                                                                                                                    ^                                                                                        ./gen_02065.cpp:794:149: note: remove the call to 'abs' since unsigned values cannot be negative
int8_tVar_146 *= ((((int8_t)(((int8_tVar_146) + (int8_tVar_146)))) ? ((false) ? ((int8_t)int8_tVar_146) : (int8_tVar_146)) : (int8_tVar_146))  >=  (abs(true)));
                                                                                                                                                    ^~~
fatal error: error in backend: SmallVector unable to grow. Requested capacity (4294967296) is larger than maximum value for size type (4294967295)                                                                                           clang-15: error: clang frontend command failed with exit code 70 (use -v to see invocation)```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJztV0tv4zYQ_jX2ZWBB1lsHH5zEWfS0i3SRHgNKGlmsJdIVKTvJr--Q8vuRbbEOtocKtETzMY9vhjOcTBZvk-8VV5B1c1gzBaXsRAHZG0zfuxoeu_f3LyigpC-2NNnC_bdvzsB9GLjT_v1FFpmsNdRcLAb-FCqtl4o6A--R2ryfdWQ7p3_v9GNhymazccEOiTx1AvKaiTmMvvow8JLXJHqJgoGXghSgKwSNSm92hHfmj5Mvl45-1YPwgdafcOW66jInlw39qevV9jNatvJPzDX9LXmNir5JmKRu7FHviKiX9syg_zwyXnctQi3lQpGqCzS8enEit2-zV8w7zY28vDHz4AWe5zouKMylKBQ4RjQUL67nRqFh1VM4H_anvhvROzIvMksruJibrqp4qSEnG2kY-LOB_wBrXugKZAn6bYlA4Iz-sKtGdtVIrrAta7k2MPUaqTXXeWVAZhkhkJw0LnQUvBgENr1n1r4EqTHFliXsl5nJ0DdweQdLZgBBBPvRQXy3Yf6zzyCcmXc8M-0qesHYNxieotcJhX91KHIsoJEFL3nOrMEYuTzLc1QKtCS5447UG0e9ejG5YdwDe0CA8PxpZW7z8BJ6y22FtqAf2fRUnTvbUhiZnbrt8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