With current trunk (revision 140100): (sid)1089:tbm@em64t: ~] /usr/lib/gcc-snapshot/bin/gcc -c -O2 asc-edgen.ii ./../../edgen.cpp: In member function 'void tmapgenerator::init()': ./../../edgen.cpp:71: error: type mismatch in binary expression long unsigned int long unsigned int int D.95017 = D.95016 + 1; ./../../edgen.cpp:71: internal compiler error: verify_gimple failed Please submit a full bug report,
Forgot to mention that this also happens with -O0
Created attachment 16251 [details] Preprocessed code
/* Testcase by Martin Michlmayr <tbm@cyrius.com> */ class tplasma { public: int maxx; }; tplasma plasma; void init (void) { new (char[plasma.maxx]); }
Even more reduced testcase: void init (int a) { new (char[a]); }
FE bug: tree array_type_nelts_top (tree type) { return fold_build2 (PLUS_EXPR, sizetype, array_type_nelts (type), integer_one_node); } Should use size_one_node instead.
Subject: Bug 37417 Author: jakub Date: Tue Sep 9 22:08:46 2008 New Revision: 140178 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=140178 Log: PR c++/37417 * tree.c (array_type_nelts_top): Add size_one_node instead of integer_one_node. * g++.dg/ext/vla5.C: New test. Added: trunk/gcc/testsuite/g++.dg/ext/vla5.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/tree.c trunk/gcc/testsuite/ChangeLog
Fixed.