This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/18519] [4.0 Regression] ICE: Segmentation fault with optimization
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Nov 2004 14:45:26 -0000
- Subject: [Bug tree-optimization/18519] [4.0 Regression] ICE: Segmentation fault with optimization
- References: <20041116110602.18519.micis@gmx.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-16 14:45 -------
I forgot to say that the reduced testcase only fails at -O1 now (I don't know why).
Also here is the C example (which is just slight changes to C++ example):
#define bool _Bool
typedef struct QChar {
unsigned short ucs;
} QChar;
int tibetan_form( const QChar *c );
static inline int tibetan_nextSyllableBoundary( int start, bool *invalid, QChar *uc)
{
int pos = 0;
int state = tibetan_form( &uc[pos] );
if ( state != 1 )
{
if ( state != 0 )
*invalid = 1;
goto finish;
}
finish:
*invalid = 0;
return start+pos;
}
void tibetan_shape( int from, int len, QChar *uc)
{
int sstart = from;
int end = sstart + len;
while ( sstart < end ) {
bool invalid;
tibetan_nextSyllableBoundary(sstart, &invalid, uc );
}
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18519