On 12/07/2011 10:18 AM, Jakub Jelinek wrote:
On Wed, Dec 07, 2011 at 10:10:08AM -0500, Jason Merrill wrote:
On 12/06/2011 02:48 PM, Jakub Jelinek wrote:
- gcc_assert (!processing_template_decl || SCALAR_TYPE_P (type));
+ gcc_assert (!processing_template_decl
+ || (SCALAR_TYPE_P (t
On Wed, Dec 07, 2011 at 10:10:08AM -0500, Jason Merrill wrote:
> On 12/06/2011 02:48 PM, Jakub Jelinek wrote:
> >- gcc_assert (!processing_template_decl || SCALAR_TYPE_P (type));
> >+ gcc_assert (!processing_template_decl
> >+ || (SCALAR_TYPE_P (type) || TREE_CODE (type) == ARRAY_TYPE));
On 12/06/2011 02:48 PM, Jakub Jelinek wrote:
- gcc_assert (!processing_template_decl || SCALAR_TYPE_P (type));
+ gcc_assert (!processing_template_decl
+ || (SCALAR_TYPE_P (type) || TREE_CODE (type) == ARRAY_TYPE));
How about SCALAR_TYPE_P (strip_array_types (type))? OK with that
Hi!
On this testcase we ICE, because cxx_eval_array_reference calls
build_value_init with ARRAY_TYPE (to get initializer for x[0]).
build_value_init seems to work for arrays of scalars (or arrays of arrays of
scalars etc.) apparently just fine even when processing_template_decl,
if I understand th