Commit cd3ef6f7 by Jason Merrill Committed by Jason Merrill

re PR c++/60277 (Bogus "inline function virtual ..." used but never defined)

	PR c++/60277
	* call.c (build_array_conv): Don't crash on VLA.

From-SVN: r208001
parent 1ea32974
2014-02-21 Jason Merrill <jason@redhat.com>
PR c++/60277
* call.c (build_array_conv): Don't crash on VLA.
PR c++/60248
* mangle.c (mangle_decl): Don't make an alias for a TYPE_DECL.
......
......@@ -948,7 +948,8 @@ build_array_conv (tree type, tree ctor, int flags, tsubst_flags_t complain)
bool user = false;
enum conversion_rank rank = cr_exact;
if (TYPE_DOMAIN (type))
if (TYPE_DOMAIN (type)
&& !variably_modified_type_p (TYPE_DOMAIN (type), NULL_TREE))
{
unsigned HOST_WIDE_INT alen = tree_to_uhwi (array_type_nelts_top (type));
if (alen < len)
......
// PR c++/60277
// { dg-options "-std=c++1y -pedantic-errors" }
void foo(int n)
{
int a[n];
int (&r)[n] = {}; // { dg-error "" }
}
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