diff options
author | Georg-Johann Lay <avr@gjlay.de> | 2024-10-02 16:23:32 +0200 |
---|---|---|
committer | Georg-Johann Lay <avr@gjlay.de> | 2024-10-02 16:50:36 +0200 |
commit | 875a1df8130342baf985650c5de1914cf37eb774 (patch) | |
tree | 9994963d0841ba8237f45394330520217081bbd2 | |
parent | 4d9e473d125ec36ae4818d36d42bf4fea09cef1f (diff) | |
download | gcc-875a1df8130342baf985650c5de1914cf37eb774.zip gcc-875a1df8130342baf985650c5de1914cf37eb774.tar.gz gcc-875a1df8130342baf985650c5de1914cf37eb774.tar.bz2 |
testsuite/52641 - Fix gcc.dg/signbit-6.c for int != 32-bit targets.
PR testsuite/52641
gcc/testsuite/
* gcc.dg/signbit-6.c (main): Initialize a[0] and b[0]
with INT32_MIN (instead of with INT_MIN).
-rw-r--r-- | gcc/testsuite/gcc.dg/signbit-6.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/testsuite/gcc.dg/signbit-6.c b/gcc/testsuite/gcc.dg/signbit-6.c index da18662..3a52289 100644 --- a/gcc/testsuite/gcc.dg/signbit-6.c +++ b/gcc/testsuite/gcc.dg/signbit-6.c @@ -38,8 +38,10 @@ int main () TYPE a[N]; TYPE b[N]; - a[0] = INT_MIN; - b[0] = INT_MIN; + /* This will invoke UB due to -INT32_MIN. The test is supposed to pass + because GCC is supposed to handle this UB case in a predictable way. */ + a[0] = INT32_MIN; + b[0] = INT32_MIN; for (int i = 1; i < N; ++i) { |