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++/51854] New: ICE in mangle.c with literal of complex floating type


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

             Bug #: 51854
           Summary: ICE in mangle.c with literal of complex floating type
    Classification: Unclassified
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: hstong@ca.ibm.com
              Host: powerpc64-unknown-linux-gnu
            Target: powerpc64-unknown-linux-gnu


ICE with imaginary component in mangled expression.

## Small self-contained source (cmplxfMangle.cpp):
template <unsigned N> struct A;

template <typename U, typename V>
char foo(U, V);

template <typename U>
void bar(A<sizeof(foo(U(), 1.0fj))> *);

int main() {
   bar<int>(0);
}


## Compiler invocation:
g++-4.6.0 cmplxfMangle.cpp -c


## Compiler output:
cmplxfMangle.cpp: In instantiation of Ãvoid bar(A<sizeof (char foo(U(),
(__complex__ float){0.0f, 1.0e+0f}))>*) [with U = int]Ã:
cmplxfMangle.cpp:10:15:   instantiated from here
cmplxfMangle.cpp:7:6: internal compiler error: in write_template_arg_literal,
at cp/mangle.c:2772
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


## g++ -v output:
Using built-in specs.
COLLECT_GCC=g++-4.6.0
COLLECT_LTO_WRAPPER=/data/gcc/libexec/gcc/powerpc64-unknown-linux-gnu/4.6.0/lto-wrapper
Target: powerpc64-unknown-linux-gnu
Configured with: ./configure --prefix=/data/gcc --program-suffix=-4.6.0
--disable-libssp --disable-libgcj --enable-version-specific-runtime-libs
--with-cpu=default32 --enable-secureplt --with-long-double-128 --enable-shared
--enable-__cxa_atexit --enable-threads=posix --enable-languages=c,c++,fortran
--with-gmp=/usr/local
Thread model: posix
gcc version 4.6.0 (GCC)


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