Commit 701e903a by Jakub Jelinek Committed by Jakub Jelinek

re PR c++/37417 (error: type mismatch in binary expression, verify_gimple failed)

	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.

From-SVN: r140178
parent c2a4718a
2008-09-09 Jakub Jelinek <jakub@redhat.com>
PR c++/37417
* tree.c (array_type_nelts_top): Add size_one_node instead of
integer_one_node.
2008-09-09 Jason Merrill <jason@redhat.com>
PR c++/37439
......
......@@ -1461,7 +1461,7 @@ array_type_nelts_top (tree type)
{
return fold_build2 (PLUS_EXPR, sizetype,
array_type_nelts (type),
integer_one_node);
size_one_node);
}
/* Return, as an INTEGER_CST node, the number of elements for TYPE
......
2008-09-09 Jakub Jelinek <jakub@redhat.com>
PR c++/37417
* g++.dg/ext/vla5.C: New test.
PR middle-end/37356
* g++.dg/tree-ssa/pr37356.C: New test.
......
// PR c++/37417
// Testcase by Martin Michlmayr <tbm@cyrius.com>
// { dg-do compile }
// { dg-options "-O" }
void
test (int a)
{
new (char[a]);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment