diff options
author | Tom de Vries <tom@codesourcery.com> | 2016-08-29 16:42:16 +0000 |
---|---|---|
committer | Tom de Vries <vries@gcc.gnu.org> | 2016-08-29 16:42:16 +0000 |
commit | 34cedad50c75e63d0898db1f117ec236bd4e3891 (patch) | |
tree | d368fdc424d1fd4d6f4ec25dbddbee00cc2cd2d3 /gcc | |
parent | f162d717123453da23ee76c8b2aab1572211fb9c (diff) | |
download | gcc-34cedad50c75e63d0898db1f117ec236bd4e3891.zip gcc-34cedad50c75e63d0898db1f117ec236bd4e3891.tar.gz gcc-34cedad50c75e63d0898db1f117ec236bd4e3891.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/c-family/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/c-family/c-common.c | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 157adc9..07be3bb 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,5 +1,9 @@ 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 with assert. diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index 3d4e97b..00f19ff 100644 --- a/gcc/c-family/c-common.c +++ b/gcc/c-family/c-common.c @@ -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'. */ ; |