https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81837
Bug ID: 81837
Summary: Internal compiler error (cp/typeck2.c:1264)
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: victor.sunye at upc dot edu
Target Milestone: ---
template <class inT>
union Unit
{
struct
{
inT a, b;
} header;
double align;
};
int
main (void)
{
Unit <int> *chunk;
chunk = new Unit <int> [10] {.align = 0};
delete [] chunk;
return 0;
}
==> compiled with "g++ -std=c++14 -g -Wall -Wextra -o compiler_bug
compiler_bug.cpp" gives:
compiler_bug.cpp:18:42: internal compiler error: in
process_init_constructor_array, at cp/typeck2.c:1264
chunk = new Unit <int> [10] {.align = 0};
^
==> g++ version: g++ (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609