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:
parent
a85cb0d7f0
commit
bf460b19f0
@ -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
|
||||
|
23
gcc/testsuite/gcc.dg/char-compare.c
Normal file
23
gcc/testsuite/gcc.dg/char-compare.c
Normal 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;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user