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 target/29984] SPE GCC segfaults with MAX_EXPR <a, a>



------- Comment #3 from pinskia at gcc dot gnu dot org  2006-11-26 07:58 -------
MAX_EXPR <aWidthD.2267, aWidthD.2267>

:)


Reassiocation produces:
  aWidth_29 = MAX_EXPR <aWidth_7, aWidth_7>;
  w_30 = MAX_EXPR <aWidth_29, iWidth_14>;

From:
  aWidth_29 = MAX_EXPR <iWidth_14, aWidth_7>;
  w_30 = MAX_EXPR <aWidth_7, aWidth_29>;

The testcase you provided is undefined which is why it no longer ICEs in 4.3.0.

Here is a testcase that ICEs in 4.3.0:
void setGeometry(int w, int h);
void resize(int h, int dx, int dy, int dw, int dh, int maxHeight, int iWidth)
{
    int aWidth = (int) dw * 1/3;
    int w = aWidth;
    if (h) {
        if (w >= 0)
            w = 0;
        if (h > maxHeight)
            h= maxHeight;
    } else
    {
        if (iWidth > aWidth)
            aWidth = iWidth;
        if (iWidth) {
            if (aWidth > w)
                w = aWidth;
        }
        if (h)
          h += 1;
    }
    setGeometry(w, h);
}


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
      Known to work|4.3.0                       |
   Last reconfirmed|0000-00-00 00:00:00         |2006-11-26 07:58:50
               date|                            |
            Summary|SPE GCC segfaults with some |SPE GCC segfaults with
                   |C++ code                    |MAX_EXPR <a, a>


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


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