diff mbox

AArch64 fix ICE due to missing TYPE_STUB_DECL on va_list.

Message ID 50BCE31F.4030105@arm.com
State New
Headers show

Commit Message

Marcus Shawcroft Dec. 3, 2012, 5:36 p.m. UTC
This patch fixes an ICE due to a missing TYPE_STUB_DECL on the builtin
va_list tree node.

/Marcus

gcc/
2012-11-27  Marcus Shawcroft  <marcus.shawcroft@arm.com>

	* config/aarch64/aarch64.c (aarch64_build_builtin_va_list): Set
	TYPE_STUB_DECL.

testsuite/

2012-11-27  Marcus Shawcroft  <marcus.shawcroft@arm.com>

	* gcc.target/aarch64/121127.c: New test.
diff mbox

Patch

diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index d4708bf..05e1da8 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -5053,6 +5053,7 @@  aarch64_build_builtin_va_list (void)
 			     va_list_type);
   DECL_ARTIFICIAL (va_list_name) = 1;
   TYPE_NAME (va_list_type) = va_list_name;
+  TYPE_STUB_DECL (va_list_type) = va_list_name;
 
   /* Create the fields.  */
   f_stack = build_decl (BUILTINS_LOCATION,
diff --git a/gcc/testsuite/gcc.target/aarch64/121127.c b/gcc/testsuite/gcc.target/aarch64/121127.c
new file mode 100644
index 0000000..a7dca09
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/121127.c
@@ -0,0 +1,4 @@ 
+/* { dg-do compile } */
+/* { dg-options "-g -femit-struct-debug-baseonly" } */
+
+typedef __builtin_va_list __gnuc_va_list;
-- 
1.7.9.5