public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/23991] New: [4.1 Regression]: Gcc failed to build on ia64
@ 2005-09-21 10:02 hjl at lucon dot org
  2005-09-21 11:06 ` [Bug middle-end/23991] " pinskia at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: hjl at lucon dot org @ 2005-09-21 10:02 UTC (permalink / raw)
  To: gcc-bugs

This patch:

http://gcc.gnu.org/ml/gcc-patches/2005-09/msg01279.html

breaks ia64. I got

/net/gnu-13/export/gnu/src/gcc/gcc/gcc/final.c: In function `get_attr_length':
/net/gnu-13/export/gnu/src/gcc/gcc/gcc/final.c:454: error: `insn_default_length'
undeclared (first use in this function)
/net/gnu-13/export/gnu/src/gcc/gcc/gcc/final.c:454: error: (Each undeclared
identifier is reported only once
/net/gnu-13/export/gnu/src/gcc/gcc/gcc/final.c:454: error: for each function it
appears in.)
/net/gnu-13/export/gnu/src/gcc/gcc/gcc/final.c: In function `get_attr_min_length':
/net/gnu-13/export/gnu/src/gcc/gcc/gcc/final.c:462: error: `insn_min_length'
undeclared (first use in this function)

-- 
           Summary: [4.1 Regression]: Gcc failed to build on ia64
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hjl at lucon dot org
                CC: gcc-bugs at gcc dot gnu dot org,joern dot rennecke at st
                    dot com
 GCC build triplet: ia64-unknown-linux-gnu
  GCC host triplet: ia64-unknown-linux-gnu
GCC target triplet: ia64-unknown-linux-gnu


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug middle-end/23991] [4.1 Regression]: Gcc failed to build on ia64
  2005-09-21 10:02 [Bug middle-end/23991] New: [4.1 Regression]: Gcc failed to build on ia64 hjl at lucon dot org
@ 2005-09-21 11:06 ` pinskia at gcc dot gnu dot org
  2005-09-21 11:28 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-21 11:06 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |build
   Target Milestone|---                         |4.1.0


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug middle-end/23991] [4.1 Regression]: Gcc failed to build on ia64
  2005-09-21 10:02 [Bug middle-end/23991] New: [4.1 Regression]: Gcc failed to build on ia64 hjl at lucon dot org
  2005-09-21 11:06 ` [Bug middle-end/23991] " pinskia at gcc dot gnu dot org
@ 2005-09-21 11:28 ` pinskia at gcc dot gnu dot org
  2005-09-21 14:08 ` joern dot rennecke at st dot com
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-21 11:28 UTC (permalink / raw)
  To: gcc-bugs


------- 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
}

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-09-21 11:28:43
               date|                            |


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug middle-end/23991] [4.1 Regression]: Gcc failed to build on ia64
  2005-09-21 10:02 [Bug middle-end/23991] New: [4.1 Regression]: Gcc failed to build on ia64 hjl at lucon dot org
  2005-09-21 11:06 ` [Bug middle-end/23991] " pinskia at gcc dot gnu dot org
  2005-09-21 11:28 ` pinskia at gcc dot gnu dot org
@ 2005-09-21 14:08 ` joern dot rennecke at st dot com
  2005-09-21 19:21 ` ian at airs dot com
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: joern dot rennecke at st dot com @ 2005-09-21 14:08 UTC (permalink / raw)
  To: gcc-bugs


------- 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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug middle-end/23991] [4.1 Regression]: Gcc failed to build on ia64
  2005-09-21 10:02 [Bug middle-end/23991] New: [4.1 Regression]: Gcc failed to build on ia64 hjl at lucon dot org
                   ` (2 preceding siblings ...)
  2005-09-21 14:08 ` joern dot rennecke at st dot com
@ 2005-09-21 19:21 ` ian at airs dot com
  2005-09-21 19:25 ` pinskia at physics dot uc dot edu
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ian at airs dot com @ 2005-09-21 19:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ian at airs dot com  2005-09-21 19:21 -------
Subject: Re:  [4.1 Regression]: Gcc failed to build on ia64

Joern RENNECKE <joern.rennecke@st.com> writes:

> 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.

Ick, don't do that.  Suppose you just #define insn_default_length and
insn_min_length as macros ifndef HAVE_ATTR_length.

Ian


-- 


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug middle-end/23991] [4.1 Regression]: Gcc failed to build on ia64
  2005-09-21 10:02 [Bug middle-end/23991] New: [4.1 Regression]: Gcc failed to build on ia64 hjl at lucon dot org
                   ` (3 preceding siblings ...)
  2005-09-21 19:21 ` ian at airs dot com
@ 2005-09-21 19:25 ` pinskia at physics dot uc dot edu
  2005-09-21 19:31 ` ian at airs dot com
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at physics dot uc dot edu @ 2005-09-21 19:25 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at physics dot uc dot edu  2005-09-21 19:24 -------
Subject: Re:  [4.1 Regression]: Gcc failed to build on ia64


On Sep 21, 2005, at 3:20 PM, Ian Lance Taylor wrote:

> Joern RENNECKE <joern.rennecke@st.com> writes:
>
>> 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.
>
> Ick, don't do that.  Suppose you just #define insn_default_length and
> insn_min_length as macros ifndef HAVE_ATTR_length.


Of course both insn_default_length and insn_min_length are used as 
functions
in this situation.

Thanks,
Andrew Pinski



-- 


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug middle-end/23991] [4.1 Regression]: Gcc failed to build on ia64
  2005-09-21 10:02 [Bug middle-end/23991] New: [4.1 Regression]: Gcc failed to build on ia64 hjl at lucon dot org
                   ` (4 preceding siblings ...)
  2005-09-21 19:25 ` pinskia at physics dot uc dot edu
@ 2005-09-21 19:31 ` ian at airs dot com
  2005-09-22 17:15 ` joern dot rennecke at st dot com
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ian at airs dot com @ 2005-09-21 19:31 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ian at airs dot com  2005-09-21 19:30 -------
Subject: Re:  [4.1 Regression]: Gcc failed to build on ia64

Andrew Pinski <pinskia@physics.uc.edu> writes:

> On Sep 21, 2005, at 3:20 PM, Ian Lance Taylor wrote:
> 
> > Joern RENNECKE <joern.rennecke@st.com> writes:
> >
> >> 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.
> >
> > Ick, don't do that.  Suppose you just #define insn_default_length and
> > insn_min_length as macros ifndef HAVE_ATTR_length.
> 
> 
> Of course both insn_default_length and insn_min_length are used as
> functions
> in this situation.

Hmmm, right.  Bother.  Still doable, but uglier.

Ian


-- 


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug middle-end/23991] [4.1 Regression]: Gcc failed to build on ia64
  2005-09-21 10:02 [Bug middle-end/23991] New: [4.1 Regression]: Gcc failed to build on ia64 hjl at lucon dot org
                   ` (5 preceding siblings ...)
  2005-09-21 19:31 ` ian at airs dot com
@ 2005-09-22 17:15 ` joern dot rennecke at st dot com
  2005-09-22 19:24 ` ian at airs dot com
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: joern dot rennecke at st dot com @ 2005-09-22 17:15 UTC (permalink / raw)
  To: gcc-bugs


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

Ian Lance Taylor wrote:

>>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.
>>    
>>
>
>Ick, don't do that.  Suppose you just #define insn_default_length and
>insn_min_length as macros ifndef HAVE_ATTR_length.
>
>Ian
>  
>
Do you like the attached patch better?


2005-09-22  J"orn Rennecke <joern.rennecke@st.com>

	* final.c (insn_default_length, insn_min_length): In !HAVE_ATTR_length
	case, define as macros.

Index: final.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/final.c,v
retrieving revision 1.361
diff -p -r1.361 final.c
*** final.c	20 Sep 2005 21:48:36 -0000	1.361
--- final.c	22 Sep 2005 17:10:14 -0000
*************** get_attr_length_1 (rtx insn ATTRIBUTE_UN
*** 443,448 ****
--- 443,450 ----
    return length;
  #else /* not HAVE_ATTR_length */
    return 0;
+ #define insn_default_length 0
+ #define insn_min_length 0
  #endif /* not HAVE_ATTR_length */
  }
  


-- 


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug middle-end/23991] [4.1 Regression]: Gcc failed to build on ia64
  2005-09-21 10:02 [Bug middle-end/23991] New: [4.1 Regression]: Gcc failed to build on ia64 hjl at lucon dot org
                   ` (6 preceding siblings ...)
  2005-09-22 17:15 ` joern dot rennecke at st dot com
@ 2005-09-22 19:24 ` ian at airs dot com
  2005-09-23 12:15 ` cvs-commit at gcc dot gnu dot org
  2005-09-23 12:50 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: ian at airs dot com @ 2005-09-22 19:24 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ian at airs dot com  2005-09-22 19:23 -------
Subject: Re:  [4.1 Regression]: Gcc failed to build on ia64

Joern RENNECKE <joern.rennecke@st.com> writes:

> 2005-09-22  J"orn Rennecke <joern.rennecke@st.com>
> 
> 	* final.c (insn_default_length, insn_min_length): In !HAVE_ATTR_length
> 	case, define as macros.

I do like it better.  This patch is approved after testing.

Thanks.

Ian


-- 


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug middle-end/23991] [4.1 Regression]: Gcc failed to build on ia64
  2005-09-21 10:02 [Bug middle-end/23991] New: [4.1 Regression]: Gcc failed to build on ia64 hjl at lucon dot org
                   ` (7 preceding siblings ...)
  2005-09-22 19:24 ` ian at airs dot com
@ 2005-09-23 12:15 ` cvs-commit at gcc dot gnu dot org
  2005-09-23 12:50 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-23 12:15 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-09-23 12:15 -------
Subject: Bug 23991

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	amylaar@gcc.gnu.org	2005-09-23 12:15:43

Modified files:
	gcc            : ChangeLog 

Log message:
	Add PR number in this entry:
	PR middle-end/23991
	* final.c (insn_default_length, insn_min_length): In !HAVE_ATTR_length
	case, define as macros.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.10009&r2=2.10010



-- 


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug middle-end/23991] [4.1 Regression]: Gcc failed to build on ia64
  2005-09-21 10:02 [Bug middle-end/23991] New: [4.1 Regression]: Gcc failed to build on ia64 hjl at lucon dot org
                   ` (8 preceding siblings ...)
  2005-09-23 12:15 ` cvs-commit at gcc dot gnu dot org
@ 2005-09-23 12:50 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-23 12:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-09-23 12:50 -------
Fixed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2005-09-23 12:50 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-21 10:02 [Bug middle-end/23991] New: [4.1 Regression]: Gcc failed to build on ia64 hjl at lucon dot org
2005-09-21 11:06 ` [Bug middle-end/23991] " pinskia at gcc dot gnu dot org
2005-09-21 11:28 ` pinskia at gcc dot gnu dot org
2005-09-21 14:08 ` joern dot rennecke at st dot com
2005-09-21 19:21 ` ian at airs dot com
2005-09-21 19:25 ` pinskia at physics dot uc dot edu
2005-09-21 19:31 ` ian at airs dot com
2005-09-22 17:15 ` joern dot rennecke at st dot com
2005-09-22 19:24 ` ian at airs dot com
2005-09-23 12:15 ` cvs-commit at gcc dot gnu dot org
2005-09-23 12:50 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).