Bug 16441 - prints "inf" for large long double constant 2^16383 on S/390
Summary: prints "inf" for large long double constant 2^16383 on S/390
Status: NEW
Alias: None
Product: gdb
Classification: Unclassified
Component: gdb (show other bugs)
Version: 7.5
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-13 12:38 UTC by Andreas Krebbel
Modified: 2014-01-13 12:39 UTC (History)
1 user (show)

See Also:
Host: s390x-ibm-linux
Target: s390x-ibm-linux
Build: s390x-ibm-linux
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Krebbel 2014-01-13 12:38:38 UTC
#define TWO16383 5.94865747678615882542879663314003565E+4931L
#include <stdio.h>

int main()
{
  printf ("%Le %La\n", TWO16383, TWO16383);
}

gcc ldbl-max-gdb.c -o t -g3

(gdb) b main
Breakpoint 1 at 0x8000058e: file ldbl-max-gdb.c, line 6.
(gdb) r
Starting program: /home/andreas/glibc/tests/t 

Breakpoint 1, main () at ldbl-max-gdb.c:6
6         printf ("%Le %La\n", TWO16383, TWO16383);
(gdb) x/4xw $r13
0x800006b0:     0x7ffe0000      0x00000000      0x00000000      0x00000000
(gdb) p *(long double*)$r13
$1 = inf