Commit 6f4f30bf by Marek Polacek Committed by Marek Polacek

re PR c++/79435 (ICE on invalid C++ code (with member access into an incomplete…

re PR c++/79435 (ICE on invalid C++ code (with member access into an incomplete type) on x86_64-linux-gnu: Segmentation fault)

	PR c++/79435
	* pt.c (type_dependent_expression_p): Check if the expression type
	is null.

	* g++.dg/cpp1y/pr79435.C: New.

From-SVN: r245334
parent 67afc9a6
2017-02-10 Marek Polacek <polacek@redhat.com>
PR c++/79435
* pt.c (type_dependent_expression_p): Check if the expression type
is null.
2017-02-10 Paolo Carlini <paolo.carlini@oracle.com> 2017-02-10 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/71737 PR c++/71737
......
...@@ -23818,6 +23818,7 @@ type_dependent_expression_p (tree expression) ...@@ -23818,6 +23818,7 @@ type_dependent_expression_p (tree expression)
we couldn't determine its length in cp_complete_array_type because we couldn't determine its length in cp_complete_array_type because
it is dependent. */ it is dependent. */
if (VAR_P (expression) if (VAR_P (expression)
&& TREE_TYPE (expression) != NULL_TREE
&& TREE_CODE (TREE_TYPE (expression)) == ARRAY_TYPE && TREE_CODE (TREE_TYPE (expression)) == ARRAY_TYPE
&& !TYPE_DOMAIN (TREE_TYPE (expression)) && !TYPE_DOMAIN (TREE_TYPE (expression))
&& DECL_INITIAL (expression)) && DECL_INITIAL (expression))
......
2017-02-10 Marek Polacek <polacek@redhat.com>
PR c++/79435
* g++.dg/cpp1y/pr79435.C: New.
2017-02-10 Christophe Lyon <christophe.lyon@linaro.org> 2017-02-10 Christophe Lyon <christophe.lyon@linaro.org>
* gcc.target/aarch64/advsimd-intrinsics/p64_p128.c * gcc.target/aarch64/advsimd-intrinsics/p64_p128.c
......
// PR c++/79435
// { dg-do compile { target c++14 } }
struct A;
extern A a; // { dg-error "'a' has incomplete type" }
template < int > int f = a.x;
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