This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/61541] New: Unexpected error: 'identifier' was not declared in this scope, or ICE in gimplify.c:7871
- From: "roman at binarylife dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 17 Jun 2014 21:43:18 +0000
- Subject: [Bug c++/61541] New: Unexpected error: 'identifier' was not declared in this scope, or ICE in gimplify.c:7871
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61541
Bug ID: 61541
Summary: Unexpected error: 'identifier' was not declared in
this scope, or ICE in gimplify.c:7871
Product: gcc
Version: 4.8.4
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: roman at binarylife dot net
$ cat test1.cc
struct foo {
template <int size>
struct bar {
char* p = new char[size];
};
};
foo::bar<10> moo;
$ g++ -std=c++11 -c test1.cc
test1.cc:4:24: error: âsizeâ was not declared in this scope
char* p = new char[size];
^
$ cat test2.cc
struct zoo {
zoo(char*);
};
struct foo {
template <int size>
struct bar {
static constexpr int s = size;
zoo p = zoo(new char[s]);
};
};
foo::bar<10> moo;
$ g++ -std=c++11 -c test2.cc |& head -4
test2.cc: In constructor âconstexpr foo::bar<10>::bar()â:
test2.cc:9:27: internal compiler error: in gimplify_expr, at gimplify.c:7871
zoo p = zoo(new char[s]);
^
$ g++ --version | head -1
g++ (GCC) 4.8.4 20140617 (prerelease)
GCC 4.9 and later don't show these errors.