re PR rtl-optimization/23241 (Invalid code generated for comparison of uchar to 255)

PR rtl-optimization/23241
	* gcc.dg/char-compare.c: New test.

From-SVN: r102868
This commit is contained in:
Josh Conner 2005-08-08 18:28:46 +00:00 committed by Josh Conner
parent a85cb0d7f0
commit bf460b19f0
2 changed files with 28 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2005-08-08 Josh Conner <jconner@apple.com>
PR rtl-optimization/23241
* gcc.dg/char-compare.c: New test.
2005-08-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/22508

View File

@ -0,0 +1,23 @@
/* PR rtl-optimization/23241 */
/* Origin: Josh Conner <jconner@apple.com> */
/* { dg-do run } */
/* { dg-options "-O2" } */
extern void abort(void);
struct fbs {
unsigned char uc;
} fbs1 = {255};
void fn(struct fbs *fbs_ptr)
{
if ((fbs_ptr->uc != 255) && (fbs_ptr->uc != 0))
abort();
}
int main(void)
{
fn(&fbs1);
return 0;
}