www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/07/14:41:37

From: Kbwms <Kbwms AT aol DOT com>
Message-ID: <6aee7044.352a72cc@aol.com>
Date: Tue, 7 Apr 1998 14:39:05 EDT
To: bug-gcc AT gnu DOT com, djgpp AT delorie DOT com
Mime-Version: 1.0
Subject: Problem with Optimizer in GCC

The following problem pertains to MSDOS.

When compiling enquire.c using optimizer level three, serious
problems occur.  For example, enquire reports that the number
of bits in the significand of a float is 64.  It says exactly
the same thing for type double.

Several other errors occurred during testing as shown in the
listing which I have included in enquire.zip (attached).  It
is especially troubling that an execution of the program will
often leave the FP processor in an error state.  The result
is a status dump which I have also included in the zip file.

I note also that the following comments follow the run:

    Float expressions are evaluated in double precision
    Double expressions are evaluated in double precision
    Long double expressions are evaluated in double precision

Under ordinary circumstances, namely other compiler options
such as -O2, the expressions are evaluated in long double
precision.

The attached zip file, enquire.zip, contains

    1. enquire.c
    2. normal.run - normal output from enquire under option -O2
                    gcc -o enqgnuO2 -O2 enquire.c
    3. buggy.run  - buggy output from enquire under option -O3
                    gcc -o enqgnuO3 -O3 enquire.c
    4. sigfpe.dmp - output from a run subsequent to the buggy run
                    doesn't happen every time - just often enough
                    to be unnerving

K.B. Williams
Melbourne Beach, FL 32951-2030
407.728.2774

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019