[Bug c++/53213] New: Internal compiler error in math.h

lbl2007 at gmx dot net gcc-bugzilla@gcc.gnu.org
Thu May 3 13:48:00 GMT 2012


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

             Bug #: 53213
           Summary: Internal compiler error in math.h
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: lbl2007@gmx.net


Using C math functions in C++ triggers an ICE. See below for a simple example.
The problem actually occured when using math.h, the program below is a
stripped-down version of the preprocessed source.

gcc version 4.7.0 (GCC) 
Target: sparc-sun-solaris2.10
Configured with: ../gcc-4.7.0/configure --prefix=/h/local
--with-local-prefix=/h/local --with-gmp=/h/local --with-gnu-as --with-gnu-ld
--with-mpfr=/h/local --with-mpc=/h/local --with-local-prefix=/h/local
--enable-threads=posix --enable-languages=c,c++ --disable-nls


Compiler output:

$ gcc -c bug.c
bug_p.c: In function 'void f()':
bug_p.c:11:11: internal compiler error: Bus Error
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

-----bug.c-------------------------------------------------------
extern "C" {
  extern double log (double);
  extern float __logf(float);
  extern "C++" {
    float log(float __X) { return __logf(__X); }
  }
}

void f()
{
   log(2.0);
}



More information about the Gcc-bugs mailing list