Testcase only in 64bit mode where sizeof (long) != sizeof(int): struct c { int t; int y; c(); }; template <typename T> T * allocbuf (unsigned long size) { return new T[size]; } c * a = allocbuf<c>(10);
See PR 22368 for the patch to detect this. -- Summary: C++ front-end produces mis-match types in EQ_EXPR (array constructor) Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pinskia at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org GCC target triplet: powerpc64-darwin OtherBugsDependingO 22368 nThis: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22487