mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-04 09:14:04 +08:00
re PR tree-optimization/35833 (Wrong code generated with -ftree-vrp)
2008-04-05 Richard Guenther <rguenther@suse.de> PR tree-optimization/35833 * gcc.dg/torture/pr35833.c: New testcase. From-SVN: r133941
This commit is contained in:
parent
9fb7564ea2
commit
3d3e20df36
@ -1,3 +1,8 @@
|
||||
2008-04-05 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/35833
|
||||
* gcc.dg/torture/pr35833.c: New testcase.
|
||||
|
||||
2008-04-04 Naveen.H.S <naveen.hs@kpitcummins.com>
|
||||
|
||||
* gcc.target/sh/sh2a-band.c: New test.
|
||||
|
22
gcc/testsuite/gcc.dg/torture/pr35833.c
Normal file
22
gcc/testsuite/gcc.dg/torture/pr35833.c
Normal file
@ -0,0 +1,22 @@
|
||||
/* { dg-do run } */
|
||||
/* { dg-options "-ftree-vrp" } */
|
||||
|
||||
struct S {struct S *field;};
|
||||
struct S True, False, Z;
|
||||
static inline int f(void) {return 1;}
|
||||
static inline int g(struct S **obj) {
|
||||
return f() && *obj == &Z;
|
||||
}
|
||||
struct S **h(struct S **x) {
|
||||
if (x)
|
||||
return g(x) ? &True.field : &False.field;
|
||||
else
|
||||
return &True.field;
|
||||
}
|
||||
extern void abort (void);
|
||||
int main()
|
||||
{
|
||||
if (h(&False.field) != &False.field)
|
||||
abort ();
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user