diff options
author | Jakub Jelinek <jakub@redhat.com> | 2018-06-15 21:30:58 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2018-06-15 21:30:58 +0200 |
commit | b8d850056860ea8cdc47234d3fbf89c8d03c9342 (patch) | |
tree | 55d4264b76a39d539c20545edbed2a80418636c7 /gcc/testsuite | |
parent | b48f2352a967d6ae9342529124dd8209d0d620da (diff) | |
download | gcc-b8d850056860ea8cdc47234d3fbf89c8d03c9342.zip gcc-b8d850056860ea8cdc47234d3fbf89c8d03c9342.tar.gz gcc-b8d850056860ea8cdc47234d3fbf89c8d03c9342.tar.bz2 |
re PR middle-end/86123 (ICE in prepare_cmp_insn, at optabs.c:3967)
PR middle-end/86123
* match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
Fix up comment formatting.
* gcc.c-torture/compile/pr86123.c: New test.
From-SVN: r261647
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr86123.c | 17 |
2 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 72b8615..045c4cd 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-06-15 Jakub Jelinek <jakub@redhat.com> + + PR middle-end/86123 + * gcc.c-torture/compile/pr86123.c: New test. + 2018-06-15 Tom de Vries <tdevries@suse.de> * gcc.dg-selftests/dg-final.exp: Force sequential execution. diff --git a/gcc/testsuite/gcc.c-torture/compile/pr86123.c b/gcc/testsuite/gcc.c-torture/compile/pr86123.c new file mode 100644 index 0000000..707e6dc --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr86123.c @@ -0,0 +1,17 @@ +/* PR middle-end/86123 */ + +int +foo (_Complex unsigned x, _Complex unsigned y) +{ + _Complex unsigned t1 = x / y; + int t2 = (t1 != 0); + return t2; +} + +int +bar (_Complex unsigned x, _Complex unsigned y) +{ + _Complex unsigned t1 = x / y; + int t2 = (t1 == 0); + return t2; +} |