public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: pthomas@suse.de
To: gcc-gnats@gcc.gnu.org
Cc: aj@suse.de, mark@codesourcery.com
Subject: c++/6438: gcc gets an ICE in extract_insn, at recog.c:2132
Date: Wed, 24 Apr 2002 09:36:00 -0000 [thread overview]
Message-ID: <20020424162934.745.qmail@sources.redhat.com> (raw)
>Number: 6438
>Category: c++
>Synopsis: gcc gets an ICE in extract_insn, at recog.c:2132
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: ice-on-legal-code
>Submitter-Id: net
>Arrival-Date: Wed Apr 24 09:36:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Philipp Thomas, SuSE Linux Ag
>Release: 3.1 20020415
>Organization:
>Environment:
i486-suse-linux-gnu
>Description:
gcc gets an ICE when compiling the attached code:
Reading specs from /usr/lib/gcc-lib/i486-suse-linux/3.1/specs
Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --enable-languages=c,c++,f77,objc,java,ada --with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib --with-system-zlib --enable-shared --libdir=/usr/lib --enable-checking i486-suse-linux
Thread model: posix
gcc version 3.1 20020415 (prerelease)
/usr/lib/gcc-lib/i486-suse-linux/3.1/cc1plus -fpreprocessed bug.ii -quiet -dumpbase bug.ii -version -o /tmp/ccKX2iHz.s
GNU CPP version 3.1 20020415 (prerelease) (cpplib) (i386 Linux/ELF)
GNU C++ version 3.1 20020415 (prerelease) (i486-suse-linux)
compiled by GNU C version 3.1 20020415 (prerelease).
bug.ii: In function `void __miFillSppPoly(miPaintedSet*, miPixel, int, const
SppPoint*, int, int, double, double)':
bug.ii:201: unrecognizable insn:
(insn 536 532 537 (set (reg:DF 178)
(const_int 0 [0x0])) -1 (nil)
(nil))
bug.ii:201: Internal compiler error in extract_insn, at recog.c:2132
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="bug.cc"
Content-Disposition: inline; filename="bug.cc"
typedef unsigned int size_t;
extern void free (void *__ptr) throw ();
typedef struct
{
int x, y;
} miPoint;
typedef struct { unsigned char type; union { unsigned char index; unsigned char rgb[3]; } u; } miPixel;
typedef struct
{
int count;
miPoint *points;
unsigned int *widths;
} Spans;
typedef struct
{
miPixel pixel;
Spans *group;
int size;
int count;
int ymin, ymax;
} SpanGroup;
typedef struct lib_miPaintedSet
{
SpanGroup **groups;
int size;
int ngroups;
} _miPaintedSet;
typedef struct lib_miPaintedSet miPaintedSet;
extern void * __mi_xmalloc (size_t size);
typedef struct
{
double x, y;
} SppPoint;
static int GetFPolyYBounds (const SppPoint *pts, int n, double yFtrans, int *by, int *ty);
void
__miFillSppPoly (miPaintedSet *paintedSet, miPixel pixel, int count,
const SppPoint *ptsIn, int xTrans, int yTrans, double xFtrans, double yFtrans)
{
double xl = 0.0,
xr = 0.0,
ml = 0.0,
mr = 0.0,
dy,
i;
int y,
j,
imin,
ymin,
ymax;
int left, right,
nextleft,
nextright;
int *Marked;
unsigned int *width,
*FirstWidth;
miPoint *ptsOut,
*FirstPoint;
imin = GetFPolyYBounds (ptsIn, count, yFtrans, &ymin, &ymax);
y = ymax - ymin + 1;
if ((count < 3) || (y <= 0))
return;
ptsOut = FirstPoint = (miPoint *)__mi_xmalloc(sizeof(miPoint) * y);
width = FirstWidth = (unsigned int *)__mi_xmalloc(sizeof(unsigned int) * y);
Marked = (int *) __mi_xmalloc(sizeof(int) * count);
for (j = 0; j < count; j++)
Marked[j] = 0;
nextleft = nextright = imin;
Marked[imin] = -1;
y = ({double _x = (ptsIn[nextleft].y + yFtrans); int _i = (int)_x; ((_x == _i) || (_x < 0.0)) ? _i : _i + 1;});
do
{
if ((y > (ptsIn[nextleft].y + yFtrans) ||
((((y) - (ptsIn[nextleft].y + yFtrans)) >= 0.0 ? ((y) - (ptsIn[nextleft].y + yFtrans)) : -((y) - (ptsIn[nextleft].y + yFtrans))) <= 0.000001))
&& Marked[nextleft] != 1)
{
Marked[nextleft]++;
left = nextleft++;
if (nextleft >= count)
nextleft = 0;
dy = ptsIn[nextleft].y - ptsIn[left].y;
if (dy != 0.0)
{
ml = (ptsIn[nextleft].x - ptsIn[left].x) / dy;
dy = y - (ptsIn[left].y + yFtrans);
xl = (ptsIn[left].x + xFtrans) + ml * ({double _a = (dy), _b = (0); _a > _b ? _a : _b; });
}
}
if ((y > ptsIn[nextright].y + yFtrans)
||
(((((y) - (ptsIn[nextright].y + yFtrans)) >= 0.0 ? ((y) - (ptsIn[nextright].y + yFtrans)) : -((y) - (ptsIn[nextright].y + yFtrans))) <= 0.000001)
&& Marked[nextright] != 1))
{
Marked[nextright]++;
right = nextright--;
if (nextright < 0)
nextright = count - 1;
dy = ptsIn[nextright].y - ptsIn[right].y;
if (dy != 0.0)
{
mr = (ptsIn[nextright].x - ptsIn[right].x) / dy;
dy = y - (ptsIn[right].y + yFtrans);
xr = (ptsIn[right].x + xFtrans) + mr * ({double _a = (dy), _b = (0); _a > _b ? _a : _b; });
}
}
i = (({double _a = (ptsIn[nextleft].y), _b = (ptsIn[nextright].y); _a < _b ? _a : _b; }) + yFtrans) - y;
if (i < 0.000001)
{
if(Marked[nextleft] && Marked[nextright])
{
break;
}
continue;
}
else
{
j = (int) i;
if (!j)
j++;
}
while (j > 0)
{
int cxl, cxr;
ptsOut->y = (y) + yTrans;
cxl = ({double _x = (xl); int _i = (int)_x; ((_x == _i) || (_x < 0.0)) ? _i : _i + 1;});
cxr = ({double _x = (xr); int _i = (int)_x; ((_x == _i) || (_x < 0.0)) ? _i : _i + 1;});
if (xl < xr)
{
*(width++) = (unsigned int)(cxr - cxl);
(ptsOut++)->x = cxl + xTrans;
}
else
{
*(width++) = (unsigned int)(cxl - cxr);
(ptsOut++)->x = cxr + xTrans;
}
y++;
xl += ml;
xr += mr;
j--;
}
} while (y <= ymax);
free (Marked);
{
Spans spanRec;
if (ptsOut - FirstPoint > 0)
{
spanRec.points = (FirstPoint);
spanRec.widths = (FirstWidth);
spanRec.count = (ptsOut - FirstPoint);
}
else
{
free (FirstPoint);
free (FirstWidth);
}
}
}
next reply other threads:[~2002-04-24 16:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-24 9:36 pthomas [this message]
2002-04-24 10:56 mmitchel
2002-04-24 15:47 mmitchel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020424162934.745.qmail@sources.redhat.com \
--to=pthomas@suse.de \
--cc=aj@suse.de \
--cc=gcc-gnats@gcc.gnu.org \
--cc=mark@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).