public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51833] New: ICE in tsubst_copy, at cp/pt.c:11333
@ 2012-01-12  5:30 naddiseo at gmail dot com
  2012-01-12  5:31 ` [Bug c++/51833] " naddiseo at gmail dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: naddiseo at gmail dot com @ 2012-01-12  5:30 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51833
           Summary: ICE in tsubst_copy, at cp/pt.c:11333
    Classification: Unclassified
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: naddiseo@gmail.com


$ g++ -std=c++0x -o test.bin testcase.cpp
test.cpp: In member function ‘void Foo::dostuff(T, U) [with T = Bar, U =
bool(Arg*)]’:
test.cpp:21:17: internal compiler error: in tsubst_copy, at cp/pt.c:11333
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.




$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6.1/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
4.6.1-9ubuntu3' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++,go --prefix=/usr
--program-suffix=-4.6 --enable-shared --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin
--enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)


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

* [Bug c++/51833] ICE in tsubst_copy, at cp/pt.c:11333
  2012-01-12  5:30 [Bug c++/51833] New: ICE in tsubst_copy, at cp/pt.c:11333 naddiseo at gmail dot com
@ 2012-01-12  5:31 ` naddiseo at gmail dot com
  2012-01-12  5:58 ` naddiseo at gmail dot com
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: naddiseo at gmail dot com @ 2012-01-12  5:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Richard Eames <naddiseo at gmail dot com> 2012-01-12 05:31:05 UTC ---
Created attachment 26304
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26304
Testcase


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

* [Bug c++/51833] ICE in tsubst_copy, at cp/pt.c:11333
  2012-01-12  5:30 [Bug c++/51833] New: ICE in tsubst_copy, at cp/pt.c:11333 naddiseo at gmail dot com
  2012-01-12  5:31 ` [Bug c++/51833] " naddiseo at gmail dot com
@ 2012-01-12  5:58 ` naddiseo at gmail dot com
  2012-01-12  8:53 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: naddiseo at gmail dot com @ 2012-01-12  5:58 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Eames <naddiseo at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |4.7.0

--- Comment #2 from Richard Eames <naddiseo at gmail dot com> 2012-01-12 05:58:23 UTC ---
Tested in 4.7.0, fails too.


$ /usr/lib/gcc-snapshot/bin/g++ -std=c++0x -o test.bin testcase.cpp
testcase.cpp: In member function 'void Foo::dostuff(T, U) [with T = Bar; U =
bool(Arg*)]':
testcase.cpp:21:17: internal compiler error: in tsubst_copy, at cp/pt.c:11748



$ /usr/lib/gcc-snapshot/bin/g++ -v
Using built-in specs.
COLLECT_GCC=/usr/lib/gcc-snapshot/bin/g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc-snapshot/libexec/gcc/x86_64-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
20111010-0ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-snapshot/README.Bugs
--enable-languages=c,ada,c++,java,fortran,objc,obj-c++,go
--prefix=/usr/lib/gcc-snapshot --enable-shared --enable-linker-build-id
--with-system-zlib --disable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin
--disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.7-snap/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.7-snap
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.7-snap
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic
--enable-checking=yes --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.7.0 20111010 (experimental) [trunk revision 179769]
(Ubuntu/Linaro 20111010-0ubuntu1)


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

* [Bug c++/51833] ICE in tsubst_copy, at cp/pt.c:11333
  2012-01-12  5:30 [Bug c++/51833] New: ICE in tsubst_copy, at cp/pt.c:11333 naddiseo at gmail dot com
  2012-01-12  5:31 ` [Bug c++/51833] " naddiseo at gmail dot com
  2012-01-12  5:58 ` naddiseo at gmail dot com
@ 2012-01-12  8:53 ` rguenth at gcc dot gnu.org
  2012-01-12  9:35 ` redi at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-01-12  8:53 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-01-12
     Ever Confirmed|0                           |1
      Known to fail|                            |4.5.3, 4.6.2

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-12 08:52:43 UTC ---
Confirmed.  Not sure if the testcase is valid or not.


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

* [Bug c++/51833] ICE in tsubst_copy, at cp/pt.c:11333
  2012-01-12  5:30 [Bug c++/51833] New: ICE in tsubst_copy, at cp/pt.c:11333 naddiseo at gmail dot com
                   ` (2 preceding siblings ...)
  2012-01-12  8:53 ` rguenth at gcc dot gnu.org
@ 2012-01-12  9:35 ` redi at gcc dot gnu.org
  2012-01-12 20:01 ` naddiseo at gmail dot com
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu.org @ 2012-01-12  9:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-01-12 09:34:49 UTC ---
It's not valid, you can't pass a function type by value


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

* [Bug c++/51833] ICE in tsubst_copy, at cp/pt.c:11333
  2012-01-12  5:30 [Bug c++/51833] New: ICE in tsubst_copy, at cp/pt.c:11333 naddiseo at gmail dot com
                   ` (3 preceding siblings ...)
  2012-01-12  9:35 ` redi at gcc dot gnu.org
@ 2012-01-12 20:01 ` naddiseo at gmail dot com
  2012-01-12 20:02 ` naddiseo at gmail dot com
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: naddiseo at gmail dot com @ 2012-01-12 20:01 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Richard Eames <naddiseo at gmail dot com> 2012-01-12 20:01:15 UTC ---
I've reduced the testcase further. It appears to be a problem with templates.
The reason I was passing a function type in the template was because
std::function<bool(Arg*)> wouldn't work for me. If I take out the first
parameter so that it's just the function pointer, then std::function works with
the lambda as a default argument, but as soon as the function is templated I
get the IRC.


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

* [Bug c++/51833] ICE in tsubst_copy, at cp/pt.c:11333
  2012-01-12  5:30 [Bug c++/51833] New: ICE in tsubst_copy, at cp/pt.c:11333 naddiseo at gmail dot com
                   ` (4 preceding siblings ...)
  2012-01-12 20:01 ` naddiseo at gmail dot com
@ 2012-01-12 20:02 ` naddiseo at gmail dot com
  2012-01-12 20:43 ` redi at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: naddiseo at gmail dot com @ 2012-01-12 20:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Richard Eames <naddiseo at gmail dot com> 2012-01-12 20:01:52 UTC ---
Created attachment 26309
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26309
Reduced test case


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

* [Bug c++/51833] ICE in tsubst_copy, at cp/pt.c:11333
  2012-01-12  5:30 [Bug c++/51833] New: ICE in tsubst_copy, at cp/pt.c:11333 naddiseo at gmail dot com
                   ` (5 preceding siblings ...)
  2012-01-12 20:02 ` naddiseo at gmail dot com
@ 2012-01-12 20:43 ` redi at gcc dot gnu.org
  2013-02-15 11:32 ` paolo.carlini at oracle dot com
  2013-02-15 11:47 ` paolo.carlini at oracle dot com
  8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu.org @ 2012-01-12 20:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-01-12 20:43:04 UTC ---
Further reduced

struct function
{
  template<typename T>
    function(T) { }
};

class Foo {
public:
  template<typename>
    void dostuff(function callback = []() { }) { }
};

int main() {
  Foo foo;
  foo.dostuff<int>();
}


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

* [Bug c++/51833] ICE in tsubst_copy, at cp/pt.c:11333
  2012-01-12  5:30 [Bug c++/51833] New: ICE in tsubst_copy, at cp/pt.c:11333 naddiseo at gmail dot com
                   ` (6 preceding siblings ...)
  2012-01-12 20:43 ` redi at gcc dot gnu.org
@ 2013-02-15 11:32 ` paolo.carlini at oracle dot com
  2013-02-15 11:47 ` paolo.carlini at oracle dot com
  8 siblings, 0 replies; 10+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-02-15 11:32 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #8 from Paolo Carlini <paolo.carlini at oracle dot com> 2013-02-15 11:32:02 UTC ---
This is fixed in mainline. I'm adding the reduced testcase and closing the
issue.


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

* [Bug c++/51833] ICE in tsubst_copy, at cp/pt.c:11333
  2012-01-12  5:30 [Bug c++/51833] New: ICE in tsubst_copy, at cp/pt.c:11333 naddiseo at gmail dot com
                   ` (7 preceding siblings ...)
  2013-02-15 11:32 ` paolo.carlini at oracle dot com
@ 2013-02-15 11:47 ` paolo.carlini at oracle dot com
  8 siblings, 0 replies; 10+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-02-15 11:47 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE

--- Comment #9 from Paolo Carlini <paolo.carlini at oracle dot com> 2013-02-15 11:47:06 UTC ---
It's in fact a Dup.

*** This bug has been marked as a duplicate of bug 55223 ***


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

end of thread, other threads:[~2013-02-15 11:47 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-12  5:30 [Bug c++/51833] New: ICE in tsubst_copy, at cp/pt.c:11333 naddiseo at gmail dot com
2012-01-12  5:31 ` [Bug c++/51833] " naddiseo at gmail dot com
2012-01-12  5:58 ` naddiseo at gmail dot com
2012-01-12  8:53 ` rguenth at gcc dot gnu.org
2012-01-12  9:35 ` redi at gcc dot gnu.org
2012-01-12 20:01 ` naddiseo at gmail dot com
2012-01-12 20:02 ` naddiseo at gmail dot com
2012-01-12 20:43 ` redi at gcc dot gnu.org
2013-02-15 11:32 ` paolo.carlini at oracle dot com
2013-02-15 11:47 ` 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).