public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dev.lists at jessamine dot co.uk" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/47950] [C++0x] Internal compiler error: non-dependent declaration as condition causes tsubst_copy_and_build assertion failure. Date: Wed, 02 Mar 2011 15:39:00 -0000 [thread overview] Message-ID: <bug-47950-4-BrcA8H8wW8@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-47950-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47950 Adam Butcher <dev.lists at jessamine dot co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dev.lists at jessamine dot | |co.uk, jason at gcc dot | |gnu.org --- Comment #1 from Adam Butcher <dev.lists at jessamine dot co.uk> 2011-03-02 15:39:00 UTC --- Added Jason to CC. Rolling back to my previous HEAD reveals that the reduced example above still fails whereas the code I was originally trying to build worked. So obviously my reduction has changed something. It doesn't change the fact that there is an internal compiler error with the example above but it does mean that maybe it is less likely to be hit. So I was wrong that the above code has regressed in the last few days. The code that I was originally trying to build, which did work a few days ago and now fails with the symptoms described above was using BOOST_FOREACH. Obviously this is unnecessary in C++0x as there is for(:) but it was compiling fine before (and does in an old GCC 4.5 I have in C++0x mode). The boost example was a non-dependent boost.foreach in a function template: #include <vector> #include <boost/foreach.hpp> template <typename T> void f() { std::vector<int> v = { 1,2,3,4 }; BOOST_FOREACH(int x, v) { } } int main() { f<int>(); } Making the vector dependent on T rather than int makes the problem go away. I arrived at the reduction stated previously by breaking down BOOST_FOREACH until the failure occurred. Clearly there is an issue here but I'll do a bit more investigation into why the boost example worked a few builds ago and why my reduction doesn't.
next prev parent reply other threads:[~2011-03-02 15:39 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-03-02 11:21 [Bug c++/47950] New: " dev.lists at jessamine dot co.uk 2011-03-02 15:39 ` dev.lists at jessamine dot co.uk [this message] 2011-03-02 16:08 ` [Bug c++/47950] [4.6 Regression] " redi at gcc dot gnu.org 2011-03-02 16:30 ` dev.lists at jessamine dot co.uk 2011-03-02 22:46 ` jason at gcc dot gnu.org 2011-03-03 2:49 ` jason at gcc dot gnu.org 2011-03-03 8:47 ` dev.lists at jessamine dot co.uk 2011-03-03 16:51 ` jason at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-47950-4-BrcA8H8wW8@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).