diff options
author | Andrew MacLeod <amacleod@redhat.com> | 2021-11-25 08:58:19 -0500 |
---|---|---|
committer | Andrew MacLeod <amacleod@redhat.com> | 2021-11-25 09:02:28 -0500 |
commit | 1598bd47b2a4a5f12b5a987d16d82634644db4b6 (patch) | |
tree | ed2f70dda473a230e93fff862cec2152622d7e1e /gcc | |
parent | a2ae4e9ac39319e24f9e2abc93ef6a00d44798f0 (diff) | |
download | gcc-1598bd47b2a4a5f12b5a987d16d82634644db4b6.zip gcc-1598bd47b2a4a5f12b5a987d16d82634644db4b6.tar.gz gcc-1598bd47b2a4a5f12b5a987d16d82634644db4b6.tar.bz2 |
Add the testcase for this PR to the testsuite.
Various ranger-enabled patches like threading and VRP2 can do this now, so add the testcase for posterity.
gcc/testsuite/
PR tree-optimization/102648
* gcc.dg/pr102648.c: New.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr102648.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr102648.c b/gcc/testsuite/gcc.dg/pr102648.c new file mode 100644 index 0000000..a0f6386 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr102648.c @@ -0,0 +1,21 @@ +/* { dg-do compile } */ +/* { dg-options "-O3 -fdump-tree-optimized" } */ + +void foo(); +static char a, c; +static int d, e; +static short b(short f, short g) { return f * g; } +int main() { + short h = 4; + for (; d;) + if (h) + if(e) { + if (!b(a & 1 | h, 3)) + c = 0; + h = 1; + } + if (c) + foo(); +} + +/* { dg-final { scan-tree-dump-not "foo" "optimized" } } */ |