re PR middle-end/19983 (__builtin_nan should allow 0X as well as 0x)
PR middle-end/19983 * real.c (real_nan): Allow both 0x and 0X as hexadecimal prefixes. * gcc.c-torture/execute/ieee/builtin-nan-1.c: New test case. From-SVN: r111470
This commit is contained in:
parent
efa1cdf018
commit
53f1b560db
4 changed files with 33 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2006-02-26 Roger Sayle <roger@eyesopen.com>
|
||||
|
||||
PR middle-end/19983
|
||||
* real.c (real_nan): Allow both 0x and 0X as hexadecimal prefixes.
|
||||
|
||||
2006-02-26 Zdenek Dvorak <dvorakz@suse.cz>
|
||||
|
||||
* opts.c (decode_options): Do not handle flag_strength_reduce.
|
||||
|
|
|
@ -2193,8 +2193,12 @@ real_nan (REAL_VALUE_TYPE *r, const char *str, int quiet,
|
|||
str++;
|
||||
if (*str == '0')
|
||||
{
|
||||
if (*++str == 'x')
|
||||
str++, base = 16;
|
||||
str++;
|
||||
if (*str == 'x' || *str == 'X')
|
||||
{
|
||||
base = 16;
|
||||
str++;
|
||||
}
|
||||
else
|
||||
base = 8;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2006-02-26 Roger Sayle <roger@eyesopen.com>
|
||||
|
||||
PR middle-end/19983
|
||||
* gcc.c-torture/execute/ieee/builtin-nan-1.c: New test case.
|
||||
|
||||
2006-02-26 Zdenek Dvorak <dvorakz@suse.cz>
|
||||
|
||||
* gcc.target/i386/20000614-2.c: Do not use -fno-strength-reduce.
|
||||
|
|
17
gcc/testsuite/gcc.c-torture/execute/ieee/builtin-nan-1.c
Normal file
17
gcc/testsuite/gcc.c-torture/execute/ieee/builtin-nan-1.c
Normal file
|
@ -0,0 +1,17 @@
|
|||
/* PR middle-end/19983 */
|
||||
|
||||
typedef __SIZE_TYPE__ size_t;
|
||||
|
||||
extern void abort(void);
|
||||
extern int memcmp(const void *, const void *, size_t);
|
||||
|
||||
double n1 = __builtin_nan("0x1");
|
||||
double n2 = __builtin_nan("0X1");
|
||||
|
||||
int main()
|
||||
{
|
||||
if (memcmp (&n1, &n2, sizeof(double)))
|
||||
abort();
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Add table
Reference in a new issue