http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48029
Summary: ICE in finish_member_declaration() with --param
ggc-min-expand=0 --param ggc-min-heapsize=0
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: [email protected]
ReportedBy: [email protected]
We ICE for the following C++ test case using a recent trunk (revision 170689)
and 4.5 branch (revision 170668) when we force GC to always run. Otherwise, we
do not ICE.
---------------------------------------------------------
#include <string>
#include <vector>
#include <map>
using namespace std;
namespace my_namespace
{
enum my_enum
{
ENUM0 = 0,
ENUM1 = 1,
ENUM2 = 2
};
typedef vector<string> myvectype0[ENUM2];
typedef vector<string> myvectype1[ENUM2];
typedef string mytype2;
typedef map<mytype2, myvectype0*> mytype3;
struct my_struct
{
mytype3 field0;
myvectype1 field1;
};
};
using namespace my_namespace;
int main()
{
my_struct tmp;
return 0;
}
---------------------------------------------------------
/home/bergner/gcc/install/gcc-mainline-debug/bin/g++ -S --param
ggc-min-expand=0 --param ggc-min-heapsize=0 -m64 bug.cpp
In file included from
/home/bergner/gcc/install/gcc-mainline-debug/lib/gcc/powerpc64-linux/4.6.0/../../../../include/c++/4.6.0/powerpc64-linux/bits/c++allocator.h:34:0,
from
/home/bergner/gcc/install/gcc-mainline-debug/lib/gcc/powerpc64-linux/4.6.0/../../../../include/c++/4.6.0/bits/allocator.h:48,
from
/home/bergner/gcc/install/gcc-mainline-debug/lib/gcc/powerpc64-linux/4.6.0/../../../../include/c++/4.6.0/string:43,
from bug.cpp:1:
/home/bergner/gcc/install/gcc-mainline-debug/lib/gcc/powerpc64-linux/4.6.0/../../../../include/c++/4.6.0/ext/new_allocator.h:
In instantiation of ‘__gnu_cxx::new_allocator<std::pair<const
std::basic_string<char>, std::vector<std::basic_string<char> > (*)[2]> >’:
/home/bergner/gcc/install/gcc-mainline-debug/lib/gcc/powerpc64-linux/4.6.0/../../../../include/c++/4.6.0/bits/allocator.h:92:11:
instantiated from ‘std::allocator<std::pair<const std::basic_string<char>,
std::vector<std::basic_string<char> > (*)[2]> >’
/home/bergner/gcc/install/gcc-mainline-debug/lib/gcc/powerpc64-linux/4.6.0/../../../../include/c++/4.6.0/bits/stl_tree.h:335:15:
instantiated from ‘std::_Rb_tree<std::basic_string<char>, std::pair<const
std::basic_string<char>, std::vector<std::basic_string<char> > (*)[2]>,
std::_Select1st<std::pair<const std::basic_string<char>,
std::vector<std::basic_string<char> > (*)[2]> >,
std::less<std::basic_string<char> >, std::allocator<std::pair<const
std::basic_string<char>, std::vector<std::basic_string<char> > (*)[2]> > >’
/home/bergner/gcc/install/gcc-mainline-debug/lib/gcc/powerpc64-linux/4.6.0/../../../../include/c++/4.6.0/bits/stl_map.h:130:17:
instantiated from ‘std::map<std::basic_string<char>,
std::vector<std::basic_string<char> > (*)[2], std::less<std::basic_string<char>
>, std::allocator<std::pair<const std::basic_string<char>,
std::vector<std::basic_string<char> > (*)[2]> > >’
/home/bergner/gcc/install/gcc-mainline-debug/lib/gcc/powerpc64-linux/4.6.0/../../../../include/c++/4.6.0/bits/stl_map.h:153:14:
instantiated from ‘std::map<_Key, _Tp, _Compare, _Alloc>::map() [with _Key =
std::basic_string<char>, _Tp = std::vector<std::basic_string<char> > (*)[2],
_Compare = std::less<std::basic_string<char> >, _Alloc =
std::allocator<std::pair<const std::basic_string<char>,
std::vector<std::basic_string<char> > (*)[2]> >]’
bug.cpp:22:10: instantiated from here
/home/bergner/gcc/install/gcc-mainline-debug/lib/gcc/powerpc64-linux/4.6.0/../../../../include/c++/4.6.0/ext/new_allocator.h:59:26:
internal compiler error: in finish_member_declaration, at cp/semantics.c:2526
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
---------------------------------------------------------
target: powerpc64-linux
Configured with: /home/bergner/gcc/gcc-mainline-stor-layout-base/configure
--target=powerpc64-linux --host=powerpc64-linux --build=powerpc64-linux
--enable-threads=posix --enable-shared --enable-__cxa_atexit
--enable-languages=c,c++ --enable-secureplt --enable-checking=yes
--with-long-double-128 --enable-decimal-float