FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian GCC

 
 
LinkBack Thread Tools
 
Old 07-06-2012, 02:40 PM
Michał Mirosław
 
Default Bug#680521: g++-4.7: ICE while compiling code using

Package: g++-4.7
Version: 4.7.1-2
Severity: important

g++ ends with ICE on following test code:

===start===
#include <functional>

struct User
{
void run(void *) {}
};

int main()
{
User u;
std::function<void()> p = std::bind(&User::run, &u, nullptr);
}
===end===

$ g++ -std=c++11 -c -O test.cpp
test.cpp: In constructor ‘std::function<_Res(_ArgTypes
....)>::function(_Functor, typename std::enable_if<(!
std::is_integral<_Functor>::value), std::function<_Res(_ArgTypes
....)>::_Useless>::type) [with _Functor = std::_Bind<std::_Mem_fn<void
(User::*)(void*)>(User*, std::nullptr_t)>; _Res = void; _ArgTypes = {};
typename std::enable_if<(! std::is_integral<_Functor>::value),
std::function<_Res(_ArgTypes ...)>::_Useless>::type =
std::function<void()>::_Useless]’:
test.cpp:12:1: internal compiler error: in type_contains_placeholder_1, at
tree.c:2957
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions.
Preprocessed source stored into /tmp/ccTlnebC.out file, please attach this to
your bugreport.

Seems related to optimization and nullptr in args. When nullptr is replaced
with (void *)0, gcc compiles the code successfully.



-- System Information:
Debian Release: wheezy/sid
APT prefers testing-proposed-updates
APT policy: (500, 'testing-proposed-updates'), (500, 'testing'), (400, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.3.6+ (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=pl_PL.UTF-8, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages g++-4.7 depends on:
ii gcc-4.7 4.7.1-2
ii gcc-4.7-base 4.7.1-2
ii libc6 2.13-33
ii libgmp10 2:5.0.5+dfsg-2
ii libmpc2 0.9-4
ii libmpfr4 3.1.0-5
ii libstdc++6-4.7-dev 4.7.1-2
ii zlib1g 1:1.2.7.dfsg-13

g++-4.7 recommends no packages.

Versions of packages g++-4.7 suggests:
ii g++-4.7-multilib 4.7.1-2
pn gcc-4.7-doc <none>
pn libstdc++6-4.7-dbg <none>

-- no debconf information



--
To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120706144027.22166.84920.reportbug@oko.nat.atmla b.pl">http://lists.debian.org/20120706144027.22166.84920.reportbug@oko.nat.atmla b.pl
 
Old 07-06-2012, 03:04 PM
Michał Mirosław
 
Default Bug#680521: g++-4.7: ICE while compiling code using

On Fri, Jul 06, 2012 at 04:40:27PM +0200, Michał Mirosław wrote:
> Package: g++-4.7
> Version: 4.7.1-2
> Severity: important

BTW, gcc 4.6 compiles the code fine.

Best Regards,
Michał Mirosław



--
To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120706150430.GA29489@rere.qmqm.pl">http://lists.debian.org/20120706150430.GA29489@rere.qmqm.pl
 

Thread Tools




All times are GMT. The time now is 12:33 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org