From 9073084a0648906c46dea5ed05650e94cf16a6ee Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 12 Jan 2024 10:47:20 +0100 Subject: [PATCH] testsuite: Fix up preprocessor conditions in bitint-31.c test Andre reported on IRC that this test has weird preprocessor conditions, obviously the intent was to test whether corresponding __*_MANT_DIG__ is equal to the expected value like earlier in the function definitions, but somehow I've ended up with a comma expression instead, which was always true. 2024-01-12 Jakub Jelinek * gcc.dg/bitint-31.c: Fix up #if conditions checking whether __*_MANT_DIG__ is equal to a particular precision. --- gcc/testsuite/gcc.dg/bitint-31.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/testsuite/gcc.dg/bitint-31.c b/gcc/testsuite/gcc.dg/bitint-31.c index d73ec6e4a99..94611bf0479 100644 --- a/gcc/testsuite/gcc.dg/bitint-31.c +++ b/gcc/testsuite/gcc.dg/bitint-31.c @@ -280,7 +280,7 @@ main () check_round (testfltu_575 (123665200736552267030251260509823595017565674550605919957031528046448612553265933585158200530621522494798835713008069669675682517153375604983773077550946583958303386074349567uwb), __builtin_inff (), 0xffffffp+104f, __builtin_inff (), 0xffffffp+104f); #endif #endif -#if __DBL_MANT_DIG__, 53 +#if __DBL_MANT_DIG__ == 53 #if __BITINT_MAXWIDTH__ >= 135 check_round (testdbl_135 (-21267647932558650424686050812251602943wb), -0x1ffffffffffffep+71, -0x1fffffffffffffp+71, -0x1ffffffffffffep+71, -0x1ffffffffffffep+71); check_round (testdbl_135 (-21267647932558650424686050812251602944wb), -0x1ffffffffffffep+71, -0x1fffffffffffffp+71, -0x1ffffffffffffep+71, -0x1ffffffffffffep+71); @@ -360,7 +360,7 @@ main () check_round (testdblu_575 (123665200736552267030251260509823595017565674550605919957031528046448612553265933585158200530621522494798835713008069669675682517153375604983773077550946583958303386074349567uwb), 0x20000000000000p+522, 0x1fffffffffffffp+522, 0x20000000000000p+522, 0x1fffffffffffffp+522); #endif #endif -#if __LDBL_MANT_DIG__, 64 +#if __LDBL_MANT_DIG__ == 64 #if __BITINT_MAXWIDTH__ >= 135 check_round (testldbl_135 (-27577662721237071616947187835994111wb), -0xa9f5e144d113e1c4p+51L, -0xa9f5e144d113e1c5p+51L, -0xa9f5e144d113e1c4p+51L, -0xa9f5e144d113e1c4p+51L); check_round (testldbl_135 (-27577662721237071616947187835994112wb), -0xa9f5e144d113e1c4p+51L, -0xa9f5e144d113e1c5p+51L, -0xa9f5e144d113e1c4p+51L, -0xa9f5e144d113e1c4p+51L); @@ -426,7 +426,7 @@ main () check_round (testldblu_575 (123665200736552267030251260509823595017565674550605919957031528046448612553265933585158200530621522494798835713008069669675682517153375604983773077550946583958303386074349567uwb), 0x10000000000000000p+511L, 0xffffffffffffffffp+511L, 0x10000000000000000p+511L, 0xffffffffffffffffp+511L); #endif #endif -#if __FLT128_MANT_DIG__, 113 +#if __FLT128_MANT_DIG__ == 113 #if __BITINT_MAXWIDTH__ >= 135 check_round (testflt128_135 (-21646332438261169091754659013488783917055wb), -0x1fce71fdcfb1797b42dede66ac9ecp+21F128, -0x1fce71fdcfb1797b42dede66ac9edp+21F128, -0x1fce71fdcfb1797b42dede66ac9ecp+21F128, -0x1fce71fdcfb1797b42dede66ac9ecp+21F128); check_round (testflt128_135 (-21646332438261169091754659013488783917056wb), -0x1fce71fdcfb1797b42dede66ac9ecp+21F128, -0x1fce71fdcfb1797b42dede66ac9edp+21F128, -0x1fce71fdcfb1797b42dede66ac9ecp+21F128, -0x1fce71fdcfb1797b42dede66ac9ecp+21F128); -- 2.11.4.GIT