Commit bc2687dd by Jakub Jelinek Committed by Jakub Jelinek

re PR c++/90969 (ICE: tree check: expected array_type, have vector_type in…

re PR c++/90969 (ICE: tree check: expected array_type, have vector_type in array_ref_low_bound, at tree.c:13570)

	PR c++/90969
	* constexpr.c (cxx_eval_array_reference): Don't look through VCE from
	vector type if lval.

	* g++.dg/ext/vector38.C: New test.

From-SVN: r272654
parent e88d863c
2019-06-25 Jakub Jelinek <jakub@redhat.com>
PR c++/90969
* constexpr.c (cxx_eval_array_reference): Don't look through VCE from
vector type if lval.
2019-06-24 Jan Hubicka <jh@suse.cz> 2019-06-24 Jan Hubicka <jh@suse.cz>
* lex.c (cxx_make_type): Set TYPE_CXX_ODR_P. * lex.c (cxx_make_type): Set TYPE_CXX_ODR_P.
......
...@@ -2616,7 +2616,8 @@ cxx_eval_array_reference (const constexpr_ctx *ctx, tree t, ...@@ -2616,7 +2616,8 @@ cxx_eval_array_reference (const constexpr_ctx *ctx, tree t,
non_constant_p, overflow_p); non_constant_p, overflow_p);
if (*non_constant_p) if (*non_constant_p)
return t; return t;
if (TREE_CODE (ary) == VIEW_CONVERT_EXPR if (!lval
&& TREE_CODE (ary) == VIEW_CONVERT_EXPR
&& VECTOR_TYPE_P (TREE_TYPE (TREE_OPERAND (ary, 0))) && VECTOR_TYPE_P (TREE_TYPE (TREE_OPERAND (ary, 0)))
&& TREE_TYPE (t) == TREE_TYPE (TREE_TYPE (TREE_OPERAND (ary, 0)))) && TREE_TYPE (t) == TREE_TYPE (TREE_TYPE (TREE_OPERAND (ary, 0))))
ary = TREE_OPERAND (ary, 0); ary = TREE_OPERAND (ary, 0);
......
2019-06-25 Jakub Jelinek <jakub@redhat.com>
PR c++/90969
* g++.dg/ext/vector38.C: New test.
2019-06-25 Martin Jambor <mjambor@suse.cz> 2019-06-25 Martin Jambor <mjambor@suse.cz>
PR ipa/90939 PR ipa/90939
......
// PR c++/90969
// { dg-do compile }
__attribute__ ((__vector_size__ (4))) int v;
int &a = v[0];
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