re PR c/84607 (Side effects discarded in address computation inside 'if')
authorRichard Biener <rguenther@suse.de>
Wed, 28 Feb 2018 13:40:41 +0000 (13:40 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 28 Feb 2018 13:40:41 +0000 (13:40 +0000)
commit9348eb677eb9e113ae7889faa5466723a307941f
treefcffeb99d5674cf27e19b9ce648a6e5782e6b8c0
parent35129fd3a745403bec0a06d62b18fc30ce1bbf8e
re PR c/84607 (Side effects discarded in address computation inside 'if')

2018-02-28  Richard Biener  <rguenther@suse.de>

PR middle-end/84607
* genmatch.c (capture_info::walk_match): Do not mark
captured expressions without operands as expr_p given
they act more like predicates and should be subject to
"lost tail" side-effect preserving.

* gcc.dg/pr84607.c: New testcase.

From-SVN: r258061
gcc/ChangeLog
gcc/genmatch.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr84607.c [new file with mode: 0644]