Commit bf460b19 by Josh Conner Committed by Josh Conner

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
parent a85cb0d7
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> 2005-08-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/22508 PR c++/22508
......
/* 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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment