Commit 42763690 by Jason Merrill Committed by Tom de Vries

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
parent c8798f2c
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.
......
......@@ -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;
......
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
......
// { 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);
}
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