Commit e8d6ec55 by Jason Merrill Committed by Jason Merrill

re PR c++/47808 ([C++0x] internal compiler error: in tsubst_copy_and_build, at cp/pt.c:13326)

	PR c++/47808
	* decl.c (compute_array_index_type): Discard folding
	if it didn't produce a constant.

From-SVN: r170878
parent a758fd67
2011-03-11 Jason Merrill <jason@redhat.com>
PR c++/47808
* decl.c (compute_array_index_type): Discard folding
if it didn't produce a constant.
2011-03-11 Jakub Jelinek <jakub@redhat.com>
PR c++/48035
......
......@@ -7523,6 +7523,8 @@ compute_array_index_type (tree name, tree size, tsubst_flags_t complain)
}
size = maybe_constant_value (size);
if (!TREE_CONSTANT (size))
size = osize;
}
if (error_operand_p (size))
......
2011-03-11 Jason Merrill <jason@redhat.com>
* g++.dg/cpp0x/regress/array1.C: New.
2011-03-11 Richard Guenther <rguenther@suse.de>
PR tree-optimization/48067
......
// PR c++/47808
// { dg-options -std=c++0x }
template <typename T>
inline T abs (T const & x) { return x; }
template <typename T>
void f (T)
{
typedef int ai[(abs(0.1) > 0) ? 1 : -1];
}
int main()
{
f(1);
}
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