public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/14261] New: Compilation failure due to if-conversion
@ 2004-02-23 18:31 sje at cup dot hp dot com
  2004-02-23 18:39 ` [Bug c/14261] " gerald at pfeifer dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: sje at cup dot hp dot com @ 2004-02-23 18:31 UTC (permalink / raw)
  To: gcc-bugs

The attached program will not compile with -O2 on IA64 linux.  If you turn off
if-conversion it will compile. See
http://gcc.gnu.org/ml/gcc/2004-02/msg01115.html for some analysis from Jim
Wilson.  This was tested with the ToT sources dated 
20040212 and also exists on older GCC compilers for IA64 Linux.

typedef union YYSTYPE {
    double dval;
    int intval;
} YYSTYPE;

YYSTYPE *x;

int
knparse (void)
{
  YYSTYPE yyvsa[200];
  register YYSTYPE *yyvsp;
  YYSTYPE yyval, *x;
  yyvsp = &yyvsa[100];
  if (yyvsp[3].intval > yyvsp[0].intval)
     yyval.intval = yyvsp[3].intval;
  else
     yyval.intval = yyvsp[0].intval;
  *x = yyval;
}

-- 
           Summary: Compilation failure due to if-conversion
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sje at cup dot hp dot com
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug c/14261] Compilation failure due to if-conversion
  2004-02-23 18:31 [Bug c/14261] New: Compilation failure due to if-conversion sje at cup dot hp dot com
@ 2004-02-23 18:39 ` gerald at pfeifer dot com
  2004-02-24  4:57 ` [Bug optimization/14261] " pinskia at gcc dot gnu dot org
  2004-08-16  0:32 ` [Bug rtl-optimization/14261] ICE " giovannibajo at libero dot it
  2 siblings, 0 replies; 8+ messages in thread
From: gerald at pfeifer dot com @ 2004-02-23 18:39 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gerald at pfeifer dot com,
                   |                            |schwab at suse dot de


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


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

* [Bug optimization/14261] Compilation failure due to if-conversion
  2004-02-23 18:31 [Bug c/14261] New: Compilation failure due to if-conversion sje at cup dot hp dot com
  2004-02-23 18:39 ` [Bug c/14261] " gerald at pfeifer dot com
@ 2004-02-24  4:57 ` pinskia at gcc dot gnu dot org
  2004-08-16  0:32 ` [Bug rtl-optimization/14261] ICE " giovannibajo at libero dot it
  2 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-24  4:57 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c                           |optimization


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


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

* [Bug rtl-optimization/14261] ICE due to if-conversion
  2004-02-23 18:31 [Bug c/14261] New: Compilation failure due to if-conversion sje at cup dot hp dot com
  2004-02-23 18:39 ` [Bug c/14261] " gerald at pfeifer dot com
  2004-02-24  4:57 ` [Bug optimization/14261] " pinskia at gcc dot gnu dot org
@ 2004-08-16  0:32 ` giovannibajo at libero dot it
  2 siblings, 0 replies; 8+ messages in thread
From: giovannibajo at libero dot it @ 2004-08-16  0:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-08-16 00:32 -------
Confirmed by Jim Wilson, and the submitter says it is not a regression. The 
testcase fails on IA-64, but Jim's analysys points to deficiencies in the 
ifcvt, so I'm keeping this as a rtl-opt bug.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |wilson at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|0000-00-00 00:00:00         |2004-08-16 00:32:13
               date|                            |
            Summary|Compilation failure due to  |ICE due to if-conversion
                   |if-conversion               |


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


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

* [Bug rtl-optimization/14261] ICE due to if-conversion
       [not found] <bug-14261-3107@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2006-05-03  8:25 ` krebbel1 at de dot ibm dot com
@ 2006-05-15 17:38 ` roger at eyesopen dot com
  3 siblings, 0 replies; 8+ messages in thread
From: roger at eyesopen dot com @ 2006-05-15 17:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from roger at eyesopen dot com  2006-05-15 17:37 -------
This should now be fixed on both mainline and the 4.1 branch.  Thanks Andreas.


-- 

roger at eyesopen dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.1.2


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


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

* [Bug rtl-optimization/14261] ICE due to if-conversion
       [not found] <bug-14261-3107@http.gcc.gnu.org/bugzilla/>
  2006-02-26 15:36 ` roger at eyesopen dot com
  2006-03-04 19:49 ` pinskia at gcc dot gnu dot org
@ 2006-05-03  8:25 ` krebbel1 at de dot ibm dot com
  2006-05-15 17:38 ` roger at eyesopen dot com
  3 siblings, 0 replies; 8+ messages in thread
From: krebbel1 at de dot ibm dot com @ 2006-05-03  8:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from krebbel1 at de dot ibm dot com  2006-05-03 08:25 -------
The similar problem occurs on s390x:
http://gcc.gnu.org/ml/gcc-patches/2006-03/msg01795.html

The problem (for ia64 and s390x) is fixed on mainline by:
http://gcc.gnu.org/ml/gcc-patches/2006-04/msg00697.html

which unfortunately revealed a problem with paradoxical subregs on big endian
machines which is fixed by:
http://gcc.gnu.org/ml/gcc-patches/2006-04/msg00951.html

(I've added the PR numbers to the changelog entries afterwards, so the patches
aren't mentioned here automatically.)

For gcc 4.1 I've proposed the following trivial patch, in case the others are
considered to risky for gcc 4.1:

Index: gcc/ifcvt.c
===================================================================
*** gcc/ifcvt.c.orig    2006-03-31 17:03:27.000000000 +0200
--- gcc/ifcvt.c 2006-03-31 17:04:04.000000000 +0200
*************** noce_process_if_block (struct ce_if_bloc
*** 2231,2236 ****
--- 2231,2238 ----
      {
        if (no_new_pseudos || GET_MODE (x) == BLKmode)
        return FALSE;
+       if (GET_CODE (x) == ZERO_EXTRACT)
+       return FALSE;
        x = gen_reg_rtx (GET_MODE (GET_CODE (x) == STRICT_LOW_PART
                                 ? XEXP (x, 0) : x));
      }


-- 


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


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

* [Bug rtl-optimization/14261] ICE due to if-conversion
       [not found] <bug-14261-3107@http.gcc.gnu.org/bugzilla/>
  2006-02-26 15:36 ` roger at eyesopen dot com
@ 2006-03-04 19:49 ` pinskia at gcc dot gnu dot org
  2006-05-03  8:25 ` krebbel1 at de dot ibm dot com
  2006-05-15 17:38 ` roger at eyesopen dot com
  3 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-03-04 19:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2006-03-04 19:49 -------
*** Bug 26555 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |debian-gcc at lists dot
                   |                            |debian dot org


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


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

* [Bug rtl-optimization/14261] ICE due to if-conversion
       [not found] <bug-14261-3107@http.gcc.gnu.org/bugzilla/>
@ 2006-02-26 15:36 ` roger at eyesopen dot com
  2006-03-04 19:49 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: roger at eyesopen dot com @ 2006-02-26 15:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from roger at eyesopen dot com  2006-02-26 15:00 -------
I've posted a proposed solution to gcc-patches:
http://gcc.gnu.org/ml/gcc-patches/2006-02/msg01909.html


-- 

roger at eyesopen dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


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


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

end of thread, other threads:[~2006-05-15 17:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-23 18:31 [Bug c/14261] New: Compilation failure due to if-conversion sje at cup dot hp dot com
2004-02-23 18:39 ` [Bug c/14261] " gerald at pfeifer dot com
2004-02-24  4:57 ` [Bug optimization/14261] " pinskia at gcc dot gnu dot org
2004-08-16  0:32 ` [Bug rtl-optimization/14261] ICE " giovannibajo at libero dot it
     [not found] <bug-14261-3107@http.gcc.gnu.org/bugzilla/>
2006-02-26 15:36 ` roger at eyesopen dot com
2006-03-04 19:49 ` pinskia at gcc dot gnu dot org
2006-05-03  8:25 ` krebbel1 at de dot ibm dot com
2006-05-15 17:38 ` roger at eyesopen dot com

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