public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51004] New: ICE in lower_stmt at gimple-low.c:428
@ 2011-11-07  9:36 kennytm at gmail dot com
  2011-11-07 13:06 ` [Bug c++/51004] " paolo.carlini at oracle dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: kennytm at gmail dot com @ 2011-11-07  9:36 UTC (permalink / raw)
  To: gcc-bugs

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: unassigned@gcc.gnu.org
        ReportedBy: kennytm@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)


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/51004] ICE in lower_stmt at gimple-low.c:428
  2011-11-07  9:36 [Bug c++/51004] New: ICE in lower_stmt at gimple-low.c:428 kennytm at gmail dot com
@ 2011-11-07 13:06 ` paolo.carlini at oracle dot com
  2011-11-07 16:44 ` kennytm at gmail dot com
  2011-11-07 17:51 ` paolo.carlini at oracle dot com
  2 siblings, 0 replies; 4+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-11-07 13:06 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2011-11-07
     Ever Confirmed|0                           |1

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-11-07 13:05:17 UTC ---
Even if you can't reduce the testcase (maybe via 'delta'? See:
http://gcc.gnu.org/wiki/A_guide_to_testcase_reduction) please attach anyway the
preprocessed *.ii, per http://gcc.gnu.org/bugs/


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/51004] ICE in lower_stmt at gimple-low.c:428
  2011-11-07  9:36 [Bug c++/51004] New: ICE in lower_stmt at gimple-low.c:428 kennytm at gmail dot com
  2011-11-07 13:06 ` [Bug c++/51004] " paolo.carlini at oracle dot com
@ 2011-11-07 16:44 ` kennytm at gmail dot com
  2011-11-07 17:51 ` paolo.carlini at oracle dot com
  2 siblings, 0 replies; 4+ messages in thread
From: kennytm at gmail dot com @ 2011-11-07 16:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from kennytm at gmail dot com 2011-11-07 16:36:37 UTC ---
Created attachment 25741
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25741
The processed file that triggers the bug.

Reduced test case:

=====================================
struct CCC
{
    int x;
};

struct S
{
    ~S() {}
};

void init_from_tuples_impl(S* tpl)
{
    new CCC{ (S(*tpl), 0) };
}
=====================================
$ g++ -c  2.cpp

2.cpp: In function ‘void init_from_tuples_impl(S*)’:
2.cpp:13:9: warning: extended initializer lists only available with -std=c++0x
or -std=gnu++0x [enabled by default]
2.cpp:14: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.
=====================================


The .ii file is the same, attached for completeness.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/51004] ICE in lower_stmt at gimple-low.c:428
  2011-11-07  9:36 [Bug c++/51004] New: ICE in lower_stmt at gimple-low.c:428 kennytm at gmail dot com
  2011-11-07 13:06 ` [Bug c++/51004] " paolo.carlini at oracle dot com
  2011-11-07 16:44 ` kennytm at gmail dot com
@ 2011-11-07 17:51 ` paolo.carlini at oracle dot com
  2 siblings, 0 replies; 4+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-11-07 17:51 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
      Known to work|                            |4.7.0
         Resolution|                            |WORKSFORME
      Known to fail|                            |4.6.2

--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-11-07 17:34:01 UTC ---
Thanks. Mainline works fine and doesn't look like a regression.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-11-07 17:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-07  9:36 [Bug c++/51004] New: ICE in lower_stmt at gimple-low.c:428 kennytm at gmail dot com
2011-11-07 13:06 ` [Bug c++/51004] " paolo.carlini at oracle dot com
2011-11-07 16:44 ` kennytm at gmail dot com
2011-11-07 17:51 ` paolo.carlini at oracle dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).