testsuite: Fix up gcc.dg/pr126464.c test.
Test case for floating-point constants now guards against representability issues on different architectures.
This commit corrects a test case in the GCC testsuite (gcc.dg/pr126464.c) that was causing failures due to floating-point constants exceeding the representable range of long double on certain architectures. The fix adds preprocessor checks to ensure that such constants are only used when they are actually representable by the target’s floating-point types, preventing spurious test failures.
In Details
The test case gcc.dg/pr126464.c used large floating-point constants (1e300 and 1e4000L) that could exceed the limits of double and long double on some targets. This patch guards the usage of these constants with preprocessor macros (__DBL_MAX_10_EXP__ and __LDBL_MAX_10_EXP__) that check if the exponent range is sufficient, thus making the test portable across architectures with varying floating-point capabilities.
- long double
- A floating-point data type that typically offers higher precision and a wider range than
double. Its exact size and precision are platform-dependent. - preprocessor checks
- Conditional compilation directives (e.g.,
#ifdef,#if) that allow code to be included or excluded based on predefined macros or conditions, enabling platform-specific behavior.