[Bug c/17385] New: internal compiler error: tree check: expected real_cst, have integer_cst in const_binop, at fold-const.c:1481

khem_raj_s at yahoo dot com gcc-bugzilla@gcc.gnu.org
Thu Sep 9 23:16:00 GMT 2004


While compiling newlib with the latest snapshot from CVS the following error 
occurs. The error disappears if -B/home/Khem/obj-gcc/gcc/ option is removed. 
But the build passes this option. This error has surfaced with latest checkins 
the compiler from a week before worked fine.


/home/Khem/obj-gcc/gcc/xgcc -B/home/Khem/obj-gcc/gcc/ -c __exp10.i -O2
/home/Khem/dev/gcc/newlib/libc/stdlib/__exp10.c: In function `__exp10':
/home/Khem/dev/gcc/newlib/libc/stdlib/__exp10.c:10: internal compiler error: 
tree check: expected real_cst, have integer_cst in const_binop, at fold-
const.c:1481
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

$ /home/Khem/obj-gcc/gcc/xgcc -v                                        
Reading specs from /opt/lib/gcc/arm-elf/3.5.0/specs
Configured with: ../dev/gcc/configure --target=arm-elf --prefix=/opt --with-
gnu-as --with-gnu-ld --without-headers --with-newlib --enable-languages=c,c++
Thread model: single
gcc version 3.5.0 20040909 (experimental)


preprocessed file
=========================================================
# 1 "/home/Khem/dev/gcc/newlib/libc/stdlib/__exp10.c"
# 1 "/home/Khem/obj-gcc//"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "/home/Khem/dev/gcc/newlib/libc/stdlib/__exp10.c"




# 1 "/home/Khem/dev/gcc/newlib/libc/include/_ansi.h" 1 3 4
# 15 "/home/Khem/dev/gcc/newlib/libc/include/_ansi.h" 3 4
# 1 "/home/Khem/obj-gcc/arm-elf/thumb/newlib/targ-include/newlib.h" 1 3 4
# 16 "/home/Khem/dev/gcc/newlib/libc/include/_ansi.h" 2 3 4
# 1 "/home/Khem/dev/gcc/newlib/libc/include/sys/config.h" 1 3 4



# 1 "/home/Khem/dev/gcc/newlib/libc/include/machine/ieeefp.h" 1 3 4
# 5 "/home/Khem/dev/gcc/newlib/libc/include/sys/config.h" 2 3 4
# 17 "/home/Khem/dev/gcc/newlib/libc/include/_ansi.h" 2 3 4
# 6 "/home/Khem/dev/gcc/newlib/libc/stdlib/__exp10.c" 2

double
__exp10(unsigned x)

{
  static const double powtab[] =
  {1.0,
   10.0,
   100.0,
   1000.0,
   10000.0};

  if (x < (sizeof (powtab) / sizeof (double)))
      return powtab[x];
  else if (x & 1)
    {
      return 10.0 * __exp10 (x - 1);
    }
  else
    {
      double n = __exp10 (x / 2);
      return n * n;
    }
}

-- 
           Summary: internal compiler error: tree check: expected real_cst,
                    have integer_cst in const_binop, at fold-const.c:1481
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: khem_raj_s at yahoo dot com
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-cygwin
GCC target triplet: arm-unknown-elf


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



More information about the Gcc-bugs mailing list