diff options
author | Jason Merrill <jason@redhat.com> | 2016-09-13 11:56:03 -0400 |
---|---|---|
committer | Tom de Vries <vries@gcc.gnu.org> | 2016-09-13 15:56:03 +0000 |
commit | 42763690bd1f536692054d4b8d530d1a5a9c29a1 (patch) | |
tree | 5a0735bd5743586794620884e0134c2c75e82770 /gcc/c-family | |
parent | c8798f2ce103aaf7f1c903a8babbd815d7b9a9fc (diff) | |
download | gcc-42763690bd1f536692054d4b8d530d1a5a9c29a1.zip gcc-42763690bd1f536692054d4b8d530d1a5a9c29a1.tar.gz gcc-42763690bd1f536692054d4b8d530d1a5a9c29a1.tar.bz2 |
Don't treat array as builtin type in set_underlying_type
2016-09-13 Jason Merrill <jason@redhat.com>
Tom de Vries <tom@codesourcery.com>
PR c++/77427
* c-common.c (set_underlying_type): Don't treat array as builtin type.
* g++.dg/pr77427.C: New test.
Co-Authored-By: Tom de Vries <tom@codesourcery.com>
From-SVN: r240112
Diffstat (limited to 'gcc/c-family')
-rw-r--r-- | gcc/c-family/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/c-family/c-common.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index d7b95de..d8f1808 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,4 +1,10 @@ 2016-09-13 Jason Merrill <jason@redhat.com> + Tom de Vries <tom@codesourcery.com> + + PR c++/77427 + * c-common.c (set_underlying_type): Don't treat array as builtin type. + +2016-09-13 Jason Merrill <jason@redhat.com> * c-common.c (check_cxx_fundamental_alignment_constraints): Don't limit types at all. diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index 9fec2cf..73bd43f8 100644 --- a/gcc/c-family/c-common.c +++ b/gcc/c-family/c-common.c @@ -12298,7 +12298,7 @@ set_underlying_type (tree x) { if (x == error_mark_node) return; - if (DECL_IS_BUILTIN (x)) + if (DECL_IS_BUILTIN (x) && TREE_CODE (TREE_TYPE (x)) != ARRAY_TYPE) { if (TYPE_NAME (TREE_TYPE (x)) == 0) TYPE_NAME (TREE_TYPE (x)) = x; |