This is the mail archive of the gcc-bugs@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]

[Bug middle-end/23991] [4.1 Regression]: Gcc failed to build on ia64


------- Additional Comments From joern dot rennecke at st dot com  2005-09-21 14:07 -------
Subject: Re:  [4.1 Regression]: Gcc failed to build on ia64

pinskia at gcc dot gnu dot org wrote:

>------- Additional Comments From pinskia at gcc dot gnu dot org  2005-09-21 11:28 -------
>Confirmed, it is kinda of interesting that IA64 is one of the few targets which does not have the length 
>attr (or have HAVE_ATTR_length defined).
>
>The easy fix is the following:
>int
>get_attr_length (rtx insn)
>{
>#ifdef HAVE_ATTR_length
>  return get_attr_length_1 (insn, insn_default_length);
>#else
>  return get_attr_length_1 (insn, 0);
>#endif
>}
>
>  
>
We have to cover both get_attr_length and get_attr_min_length.
I think the attached patch is a cleaner solution.
2005-09-21  J"orn Rennecke <joern.rennecke@st.com>

	* final.c (get_attr_length_1): In !HAVE_ATTR_length case, define as
	macro.  Don't attach ATTRIBUTE_UNUSED to arguments.
	(get_attr_length, get_attr_min_length): Add ATTRIBUTE_UNUSED.

--- final.c	2005-09-20 22:41:08.000000000 +0100
+++ final.c-fixed	2005-09-21 14:58:05.000000000 +0100
@@ -385,11 +385,10 @@ init_insn_lengths (void)
 /* Obtain the current length of an insn.  If branch shortening has been done,
    get its actual length.  Otherwise, use FALLBACK_FN to calcualte the
    length.  */
+#ifdef HAVE_ATTR_length
 static inline int
-get_attr_length_1 (rtx insn ATTRIBUTE_UNUSED,
-		   int (*fallback_fn) (rtx) ATTRIBUTE_UNUSED)
+get_attr_length_1 (rtx insn, int (*fallback_fn) (rtx))
 {
-#ifdef HAVE_ATTR_length
   rtx body;
   int i;
   int length = 0;
@@ -441,15 +440,15 @@ get_attr_length_1 (rtx insn ATTRIBUTE_UN
   ADJUST_INSN_LENGTH (insn, length);
 #endif
   return length;
+}
 #else /* not HAVE_ATTR_length */
-  return 0;
+#define get_attr_length_1(insn,fallback_fn) 0
 #endif /* not HAVE_ATTR_length */
-}
 
 /* Obtain the current length of an insn.  If branch shortening has been done,
    get its actual length.  Otherwise, get its maximum length.  */
 int
-get_attr_length (rtx insn)
+get_attr_length (rtx insn ATTRIBUTE_UNUSED)
 {
   return get_attr_length_1 (insn, insn_default_length);
 }
@@ -457,7 +456,7 @@ get_attr_length (rtx insn)
 /* Obtain the current length of an insn.  If branch shortening has been done,
    get its actual length.  Otherwise, get its minimum length.  */
 int
-get_attr_min_length (rtx insn)
+get_attr_min_length (rtx insn ATTRIBUTE_UNUSED)
 {
   return get_attr_length_1 (insn, insn_min_length);
 }


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23991


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