mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-18 11:40:54 +08:00
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
This commit is contained in:
parent
c8798f2ce1
commit
42763690bd
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
@ -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;
|
||||
|
@ -1,3 +1,9 @@
|
||||
2016-09-13 Jason Merrill <jason@redhat.com>
|
||||
Tom de Vries <tom@codesourcery.com>
|
||||
|
||||
PR c++/77427
|
||||
* g++.dg/pr77427.C: New test.
|
||||
|
||||
2016-09-13 Martin Liska <mliska@suse.cz>
|
||||
|
||||
* g++.dg/gcov/gcov-threads-1.C: Use profile_update_atomic
|
||||
|
17
gcc/testsuite/g++.dg/pr77427.C
Normal file
17
gcc/testsuite/g++.dg/pr77427.C
Normal file
@ -0,0 +1,17 @@
|
||||
// { dg-do compile }
|
||||
|
||||
void bar (__builtin_va_list &);
|
||||
|
||||
struct c
|
||||
{
|
||||
operator const __builtin_va_list &();
|
||||
operator __builtin_va_list &();
|
||||
};
|
||||
|
||||
void
|
||||
foo (void)
|
||||
{
|
||||
struct c c1;
|
||||
|
||||
bar (c1);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user