Fix assert in build_va_arg, case 2b

2016-08-29  Tom de Vries  <tom@codesourcery.com>

	* c-common.c (build_va_arg): Fix type comparison assert.

From-SVN: r239829
This commit is contained in:
Tom de Vries 2016-08-29 16:42:16 +00:00 committed by Tom de Vries
parent f162d71712
commit 34cedad50c
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2016-08-29 Tom de Vries <tom@codesourcery.com>
* c-common.c (build_va_arg): Fix type comparison assert.
2016-08-29 Tom de Vries <tom@codesourcery.com>
* c-common.c (build_va_arg): Replace first argument type error

View File

@ -5906,7 +5906,10 @@ build_va_arg (location_t loc, tree expr, tree type)
{
/* Case 2b: va_list is pointer to array elem type. */
gcc_assert (POINTER_TYPE_P (va_type));
gcc_assert (TREE_TYPE (va_type) == TREE_TYPE (canon_va_type));
/* Comparison as in std_canonical_va_list_type. */
gcc_assert (TYPE_MAIN_VARIANT (TREE_TYPE (va_type))
== TYPE_MAIN_VARIANT (TREE_TYPE (canon_va_type)));
/* Don't take the address. We've already got '&ap'. */
;