This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix build failure on alpha.


Hi!

trunk has the same error than SH on alpha before Kaz fixed it:

../../../src/libgcc/../gcc/libgcov.c: In function '__gcov_execl':
../../../src/libgcc/../gcc/libgcov.c:843: warning: cast discards qualifiers from pointer target type
../../../src/libgcc/../gcc/libgcov.c:834: internal compiler error: in stabilize_va_list, at builtins.c:4628


2008-07-12  Arthur Loiret  <arthur.loiret@u-psud.fr>

	* config/alpha/alpha.c (alpha_canonical_va_list_type): New.
	(TARGET_CANONICAL_VA_LIST_TYPE): Define.

Tested on alphaev68-linux-gnu, I will run a regtest between trunk with this
patch and a snapshot.


diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index 3509942..7ad6686 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -5760,6 +5760,14 @@ alpha_split_complex_arg (const_tree type)
   return TYPE_MODE (type) != TCmode;
 }
 
+/* Return always va_list_type_node.  */
+
+static tree
+alpha_canonical_va_list_type (tree type ATTRIBUTE_UNUSED)
+{
+  return va_list_type_node;
+}
+
 static tree
 alpha_build_builtin_va_list (void)
 {
@@ -10687,6 +10695,9 @@ alpha_init_libfuncs (void)
 #undef TARGET_VECTOR_MODE_SUPPORTED_P
 #define TARGET_VECTOR_MODE_SUPPORTED_P alpha_vector_mode_supported_p
 
+#undef TARGET_CANONICAL_VA_LIST_TYPE
+#define TARGET_CANONICAL_VA_LIST_TYPE alpha_canonical_va_list_type
+
 #undef TARGET_BUILD_BUILTIN_VA_LIST
 #define TARGET_BUILD_BUILTIN_VA_LIST alpha_build_builtin_va_list
 

Attachment: signature.asc
Description: Digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]