diff options
author | Richard Biener <rguenther@suse.de> | 2024-01-11 08:52:48 +0100 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2024-01-11 09:09:46 +0100 |
commit | 96fb3908d9b8e30f8d8355fbb133d25625a0fee9 (patch) | |
tree | 119c3ebb2e6326551c5d5b7b6bdf2a765b2b1a6e | |
parent | e1f2d58a1e2536f13d3f2ea2d7373ae62cec9125 (diff) | |
download | gcc-96fb3908d9b8e30f8d8355fbb133d25625a0fee9.zip gcc-96fb3908d9b8e30f8d8355fbb133d25625a0fee9.tar.gz gcc-96fb3908d9b8e30f8d8355fbb133d25625a0fee9.tar.bz2 |
tree-optimization/111003 - new testcase
Testcase for fixed PR.
PR tree-optimization/111003
gcc/testsuite/
* gcc.dg/tree-ssa/pr111003.c: New testcase.
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/pr111003.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr111003.c b/gcc/testsuite/gcc.dg/tree-ssa/pr111003.c new file mode 100644 index 0000000..a520765 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr111003.c @@ -0,0 +1,34 @@ +/* { dg-do compile } */ +/* { dg-options "-O3 -fdump-tree-optimized" } */ + +static int c, d, e, f; +static short g; +static int *h = &c; +void foo(void); +short(a)(); +static unsigned b(unsigned char j, int l) { return j > l ? j : j << l; } +static int *i(); +static void k(int j, unsigned char l) { + i(); + g = f; + f = g; + for (; g;) { + int m = 0; + d = a(); + for (; d;) { + if (l) + if (!(j >= -639457069 && j <= -639457069)) + if (m) + foo(); // This call should be elided + m = !(10 != (l ^ b(j, 6))) & (0 > e); + } + } +} +static int *i() { + for (; e; e = a(e, 6)) + ; + return h; +} +int main() { k(c, c); } + +/* { dg-final { scan-tree-dump-not "foo" "optimized" } } */ |