[Bug fortran/11260] New: code causes 'output_operand: floating constant misused' under g77 3.1

daevens at dancer dot ca dot sandia dot gov gcc-bugzilla@gcc.gnu.org
Fri Jun 20 00:04:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11260

           Summary: code causes 'output_operand: floating constant misused'
                    under
           Product: gcc
           Version: 3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: daevens@dancer.ca.sandia.gov
                CC: gcc-bugs@gcc.gnu.org
 GCC build triplet: alphaev68-unknown-linux-gnu
  GCC host triplet: alphaev68-unknown-linux-gnu
GCC target triplet: alphaev68-unknown-linux-gnu

Summary: code causes 'output_operand: floating constant misused' under
 g77 3.1 and an 'internal compiler error: Segmentation fault' under g77
 3.3.  These results are under an alphaev68-unknown-linux-gnu system
 running RedHat 7.1 with a stock 2.4.20 kernel.

The trivial program below is the minimum bit of munged code that
yields the same error as the real code. For 3.1, we only get an error
on compilation if we specify -O2, if we leave that out or specify -O0
then it doesn't fail. For 3.3, it fails regardless of the -O
level. Additionally the Compaq fortran compiler generates a .o file,
but does issue warnings about things not being used.

> cat t.F
      program badone
      FS(a)=EXP(a)
      SHF(a)=Y-FS(a)

      SIG= 0.0
      P=-SIG/3.0
      X=SIG+P
      Y=sqrt(X)
      CAsv=CA
      end

> /usr/local/gcc-3.1/bin/g77 -v -save-temps -c -O2 -Wall -o t.o t.F
Reading specs from
/usr/local/gcc-3.1/bin/../lib/gcc-lib/alphaev68-unknown-linux-gnu/3.1/specs
Configured with: ../gcc-3.1/configure --prefix=/usr/local/gcc-3.1-gstabs
--enable-threads --enable-long-long --with-ld=/usr/local/binuti\
ls-2.12.1/bin/ld --with-as=/usr/local/binutils-2.12.1/bin/as
--with-nm=/usr/local/binutils-2.12.1/bin/nm --with-objdump=/usr/local/binut\
ils-2.12.1/bin/objdump
Thread model: posix
gcc version 3.1
 /usr/local/gcc-3.1/bin/../lib/gcc-lib/alphaev68-unknown-linux-gnu/3.1/tradcpp0
-lang-fortran -v -iprefix /usr/local/gcc-3.1/bin/../lib/\
gcc-lib/alphaev68-unknown-linux-gnu/3.1/ -D__GNUC__=3 -D__GNUC_MINOR__=1
-D__GNUC_PATCHLEVEL__=0 -D__gnu_linux__ -Dlinux -Dunix -D_LONGL\
ONG -D__alpha__ -D__ELF__ -D__gnu_linux__ -D__linux__ -D__unix__ -D_LONGLONG
-D__alpha__ -D__ELF__ -D__linux -D__unix -Asystem=linux -D_\
_OPTIMIZE__ -D__STDC_HOSTED__=1 -D__LANGUAGE_C__ -D__LANGUAGE_C -DLANGUAGE_C
-Acpu=alpha -Amachine=alpha -D__alpha -D__alpha__ -D__alpha\
_ev6__ -Acpu=ev6 -D__alpha_bwx__ -Acpu=bwx -D__alpha_max__ -Acpu=max
-D__alpha_fix__ -Acpu=fix -D__alpha_cix__ -Acpu=cix t.F -Wall t.f
GNU traditional CPP version 3.1
 /usr/local/gcc-3.1/bin/../lib/gcc-lib/alphaev68-unknown-linux-gnu/3.1/f771 t.f
-quiet -dumpbase t.F -O2 -Wall -version -o t.s
GNU F77 version 3.1 (alphaev68-unknown-linux-gnu)
        compiled by GNU C version 3.1.
t.F: In program `badone':
t.F:10: output_operand: floating constant misused
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

> cat t.f
# 1 "t.F"
      program badone
      FS(a)=EXP(a)
      SHF(a)=Y-FS(a)

      SIG= 0.0
      P=-SIG/3.0
      X=SIG+P
      Y=sqrt(X)
      CAsv=CA
      end


> /usr/local/gcc-3.3/bin/g77 -v -save-temps -c -O2 -Wall -o t.o t.F
Reading specs from
/usr/local/gcc-3.3/lib/gcc-lib/alphaev68-unknown-linux-gnu/3.3/specs
Configured with: ../gcc-3.3/configure --prefix=/usr/local/gcc-3.3
--enable-threads --enable-long-long : (reconfigured) ../gcc-3.3/config\
ure --prefix=/usr/local/gcc-3.3 --enable-threads --enable-long-long
--with-ld=/usr/local/binutils-2.14/bin/ld --with-as=/usr/local/binut\
ils-2.14/bin/as --with-nm=/usr/local/binutils-2.14/bin/nm
--with-objdump=/usr/local/binutils-2.14/bin/objdump
Thread model: posix
gcc version 3.3
 /usr/local/gcc-3.3/lib/gcc-lib/alphaev68-unknown-linux-gnu/3.3/cc1 -E
-traditional-cpp -D_LANGUAGE_FORTRAN -quiet -v -D__GNUC__=3 -D__G\
NUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=0 -D__ELF__ t.F -Wall -O2 t.f
ignoring nonexistent directory
"/usr/local/gcc-3.3/alphaev68-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/local/gcc-3.3/include
 /usr/local/gcc-3.3/lib/gcc-lib/alphaev68-unknown-linux-gnu/3.3/include
 /usr/include
End of search list.
 /usr/local/gcc-3.3/lib/gcc-lib/alphaev68-unknown-linux-gnu/3.3/f771 t.f -quiet
-dumpbase t.F -auxbase-strip t.o -O2 -Wall -version -o t\
.s
GNU F77 version 3.3 (alphaev68-unknown-linux-gnu)
        compiled by GNU C version 3.3.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
t.F: In program `badone':
t.F:3: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.



More information about the Gcc-bugs mailing list