tree-optimization/99793 - testcase for the PR
This adds a testcase for the PR which was fixed with the fix for PR100112. 2021-09-28 Richard Biener <rguenther@suse.de> PR tree-optimization/99793 * gcc.dg/tree-ssa/pr99793.c: New testcase.
This commit is contained in:
parent
5b8b1522e0
commit
34b1e44e16
14
gcc/testsuite/gcc.dg/tree-ssa/pr99793.c
Normal file
14
gcc/testsuite/gcc.dg/tree-ssa/pr99793.c
Normal file
@ -0,0 +1,14 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O -fstrict-aliasing -fdump-tree-optimized" } */
|
||||
|
||||
extern void foo(void);
|
||||
static int a, *b = &a, c, *d = &c;
|
||||
int main()
|
||||
{
|
||||
int **e = &d;
|
||||
if (!((unsigned)((*e = d) == 0) - (*b = 1)))
|
||||
foo();
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* { dg-final { scan-tree-dump-not "foo" "optimized" } } */
|
Loading…
Reference in New Issue
Block a user