mirror of git://gcc.gnu.org/git/gcc.git
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
This commit is contained in:
parent
c2a4718a14
commit
701e903a76
|
|
@ -1,3 +1,9 @@
|
|||
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
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
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.
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
// PR c++/37417
|
||||
// Testcase by Martin Michlmayr <tbm@cyrius.com>
|
||||
// { dg-do compile }
|
||||
// { dg-options "-O" }
|
||||
|
||||
void
|
||||
test (int a)
|
||||
{
|
||||
new (char[a]);
|
||||
}
|
||||
Loading…
Reference in New Issue