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

    <tr>
        <th>Summary</th>
        <td>
            Floating point exception (core dumped)
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          starbugs-qurong
      </td>
    </tr>
</table>

<pre>
    Consider the following example:

```c
#include <stdio.h> 
float b1965kvgK6 = 0.6;
long O9058791 = 5085280;
short B8G5eG6kc = 482;
short q0L715IF3 = 701;
int efBS4s70TM( int e77wKxjnxd, long IoT7Sf0) {
        int CUloE53tcount = 0;
        if (b1965kvgK6>0) {
                long ZF75974J = (IoT7Sf0 / (((((IoT7Sf0 == 0) ? 1 : (IoT7Sf0)) == 0) ? 1 : (((IoT7Sf0 == 0) ? 1 : (IoT7Sf0))))));
                int j4W8hb6 = e77wKxjnxd+1;
                if (e77wKxjnxd) {
                        double eNfqr8I41 = --b1965kvgK6;
                        int x3eH122Md = ((323) % (((((B8G5eG6kc == 0) ? 1 : (B8G5eG6kc)) == 0) ? 1 : (((B8G5eG6kc == 0) ? 1 : (B8G5eG6kc))))));
                        double K122boHM6e = ((++b1965kvgK6) / (((((b1965kvgK6 == 0) ? 1 : (b1965kvgK6)) == 0) ? 1 : (((b1965kvgK6 == 0) ? 1 : (b1965kvgK6))))));
                        int w9wY881T1Ccount = 0;
                        do {
                                w9wY881T1Ccount = w9wY881T1Ccount + 1;
                                int zB3ijw3T = e77wKxjnxd++;
                                if (((((((B8G5eG6kc++)) % (((((B8G5eG6kc == 0) ? 1 : (B8G5eG6kc)) == 0) ? 1 : (((B8G5eG6kc == 0) ? 1 : (B8G5eG6kc))))))) / (((((x3eH122Md == 0) ? 1 : (x3eH122Md)) == 0) ? 1 : (((x3eH122Md == 0) ? 1 : (x3eH122Md))))))) != (((B8G5eG6kc*(B8G5eG6kc))))) {
                                        int gYBZII74Ta = ((((((--B8G5eG6kc))) + ((--B8G5eG6kc)))) / (((((x3eH122Md == 0) ? 1 : (x3eH122Md)) == 0) ? 1 : (((x3eH122Md == 0) ? 1 : (x3eH122Md))))));
                                        if (e77wKxjnxd) {
                                                int h01BQX3count = 0;
                                                do {
                                                        h01BQX3count = h01BQX3count + 1;
                                                        int dX6oH9Wcount = 0;
                                                        do {
                                                                dX6oH9Wcount = dX6oH9Wcount + 1;
                                                                if (((((4457.3))*(((3943.3)*(0.11))))) > (--b1965kvgK6)) {
                                                                        int q30KFlscount = 0;
                                                                        do {
                                                                                q30KFlscount = q30KFlscount + 1;
                                                                                int l84QBOKcount = 0;
                                                                                do {
                                                                                        l84QBOKcount = l84QBOKcount + 1;
                                                                                        if (l84QBOKcount > 2) {
                                                                                                break;
                                                                                        }
                                                                                        long m1t45q94e7 = IoT7Sf0 % ZF75974J;
                                                                                        ZF75974J ^= 9185431;
                                                                                        IoT7Sf0 >>= 5663379;
                                                                                } while (IoT7Sf0);
                                                                        } while (q30KFlscount<3);
                                                                }
                                                                int C510EWgcount = 0;
                                                                do {
                                                                        C510EWgcount = C510EWgcount + 1;
                                                                        if (C510EWgcount > 2) {
                                                                                break;
                                                                        }
                                                                        double A993mMi = b1965kvgK6++;
                                                                        IoT7Sf0 <<= --IoT7Sf0;
                                                                        long b2p3Nka = --ZF75974J;
                                                                } while (!(e77wKxjnxd));
                                                        } while (dX6oH9Wcount<3);
                                                } while (h01BQX3count<3);
                                        }
                                }
                        } while (w9wY881T1Ccount<3);
                }
        }
        return  (-B8G5eG6kc);
}
int main() {
        int L7KFimX4TC = 2227;
        long S6381FdD58 = 4247430;
        int Uk4W7C7I = efBS4s70TM( L7KFimX4TC,S6381FdD58);
        printf("%d\n", Uk4W7C7I);
        printf("%d\n", L7KFimX4TC);
        printf("%d\n", S6381FdD58);
        return 0;
}
``` ```
This will print the following content on gcc 9.4.0:
"-479
2227
4247430",
exception happens when using Clang 17:
"Floating point exception (core dumped)"

The related files can be found in https://github.com/starbugs-qurong/c-compiler-test/tree/main/clang



</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzUWFtz2joQ_jXiRQMjryxfHngIELc5adrplE7avvkisBNhEVuUnPPrz0gG4wskpm-d0SRG0n67--mTvVJYltk653yK2AyxxSjcqVQW01KFRbRbl-OXXSHz9SiSyb_TuczLLOEFVinHKymE3Gf5GvPXcLMVHNEbRBaIHP86pGrx4TfQLI_FLuEY0XmpkkxOUkRvcTW8EjJUOLJ8hz3_Xt87GNEFJhMH0Vk1Qch8jb_4hHmub5lRRjwGHqlnlKksFJ55Hxj_4DzHZo7tQWf8hXxyLXYXUDPuEqsez3KF-Wr2zS5dsnxA4GHT47r7-9en_DVBMMcmiju5dL-tCAIfI3d2TNrXs-ffhbxlVMVyl6sqhxpfT1lhBN4pS0RvezCI-MbLr8Blvmv_Y1AQeAevGEGgfzZbPUQXlUsNSQOsebpp2CLwq6EL0_4ErdVoKw1NyJP96KVRtZxNKmdWd7KhpjmlRwsifiJ3keCYf169FN6dXQlhPG4y2jXRUbxS_tECeEiOZCLwKFDjA1iXzpaEzlNQTxlG6fWIb9B6ouHeAojkxweHN_JCMEMwazBikuxppr3VzsfUAhmQ5p9gvp2oXry9v__pedbSml_YVUdOzugFEf-cea8PZrgryFMA_81o9rSny76IdTtrterS3dHBwfbA6l8gwfMiau2r86D1lGFhXo_YD9NqboZmVjdvJHlePAcFrH_Oft3dufYybG20UxuP-7hGVZeH_xZKz-l78Pu6xWJKrNnXH_TNXfzudq5bD63dcXFHt0JKfjjyo_84LKQhUek5Xcx2x_uBnX2B2DZzJ_S4LDd1P_VteujXnWRiWT1l6ypLi7D_Pn8vlwNNL5TcB6IcTNNwsqrWw293DKLsFK3w7K-zL_dXRntVwLpI63ppd1wRc73eHchbDEMXqW5RwcPn4X6Ruxiarq5JN5ay2Ytvc9dkfCpJWV2uDvd9KnDZrUbzLY_Z9ArSToXqrWkLzByH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