This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/71533] New: -fdump-tree-fre1 hangs while printing an unnormal long double


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71533

            Bug ID: 71533
           Summary: -fdump-tree-fre1 hangs while printing an unnormal long
                    double
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ch3root at openwall dot com
  Target Milestone: ---

`gcc -O1 -fdump-tree-fre1 test.c` hangs presumably while trying to print an
unnormal long double value. I think it shouldn't hang even if the program is
invalid.

Source code:

----------------------------------------------------------------------
#include <string.h>
#include <stdio.h>

int main()
{
  long double d;

  memcpy(&d, "\0\0\0\0\0\0\0\0\1\0\0\0\0\0\0\0", sizeof d);

  printf("%Lf\n", d);
}
----------------------------------------------------------------------

gcc version: gcc (GCC) 7.0.0 20160614 (experimental)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]