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

             Bug #: 51004
           Summary: ICE in lower_stmt at gimple-low.c:428
    Classification: Unclassified
           Product: gcc
           Version: 4.6.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: kenn...@gmail.com


Test case:

===========================================
#include <boost/python/object_core.hpp>

struct CCC
{
    int x;
};

typedef boost::python::object S;

int extract(S obj)
{
    return 0;
}

void init_from_tuples_impl(S tpl)
{
    new CCC{extract(tpl)};
}

void tuples()
{
    &init_from_tuples_impl;
}
===========================================

It should compile with no error. Instead, the compiler fails with error
message:

$ g++ -std=c++0x -c 2.cpp `pkg-config --cflags python3`
2.cpp: In function ‘void init_from_tuples_impl(S)’:
2.cpp:23:1: internal compiler error: in lower_stmt, at gimple-low.c:428
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.archlinux.org/> for instructions.

(It should be possible to remove the dependency on Boost.Python, but I haven't
have time to do so yet).





gcc config:

$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/src/gcc-4.6.2/configure --prefix=/usr --libdir=/usr/lib
--libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info
--with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-clocale=gnu --enable-gnu-unique-object
--enable-linker-build-id --with-ppl --enable-cloog-backend=isl --enable-lto
--enable-gold --enable-ld=default --enable-plugin --with-plugin-ld=ld.gold
--disable-multilib --disable-libssp --disable-libstdcxx-pch
--enable-checking=release
Thread model: posix
gcc version 4.6.2 (GCC)

Reply via email to