This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/50020] New: [C++0x] internal compiler error range for in templated class
- From: "jarrydb at cse dot unsw.edu.au" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 8 Aug 2011 01:23:17 +0000
- Subject: [Bug c++/50020] New: [C++0x] internal compiler error range for in templated class
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50020
Summary: [C++0x] internal compiler error range for in templated
class
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: critical
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: jarrydb@cse.unsw.edu.au
Host: x86_64-unknown-linux-gnu
Target: x86_64-unknown-linux-gnu
Build: x86_64-unknown-linux-gnu
Created attachment 24947
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24947
range for in templated class error
Using built-in specs.
COLLECT_GCC=/home/jarrydb/current/soft/install-latest/bin/gcc
COLLECT_LTO_WRAPPER=/home/jarrydb/current/soft/install-latest/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /home/jarrydb/current/soft/src/gcc-git/configure
--prefix=/home/jarrydb/current/soft/install-latest --disable-multilib
--enable-languages=c,c++,go
Thread model: posix
gcc version 4.7.0 20110807 (experimental) (GCC)
Using gcc svn revision 177550, this error:
init_list2.cpp: In member function âvoid A<T, N>::f(int, int)â:
init_list2.cpp:24:19: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
is produced by this code:
g++ init_list2.ii -std=gnu++0x
#include <vector>
#include <cstdint>
#include <cstdlib>
template <typename T, size_t N>
class A
{
private:
std::vector<uint16_t> m_v;
public:
void
f(int a, int b)
{
for (auto v : m_v)
{
}
}
};
int main()
{
A a;
return 0;
}
The full preprocessed source is attached.