re PR tree-optimization/87314 (pointless comparison of malloc result to a string...
authorRichard Biener <rguenther@suse.de>
Fri, 3 May 2019 10:44:17 +0000 (10:44 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 3 May 2019 10:44:17 +0000 (10:44 +0000)
commita4f9edf36c8ceebac5c34d6d913871bf1c0f5190
treefa4e96381aab2da90d4246d8e7ac8cbfa4246b38
parenta7eb97ad269b6509bd7b31ca373daea98e4d7e85
re PR tree-optimization/87314 (pointless comparison of malloc result to a string not eliminated)

2019-05-03  Richard Biener  <rguenther@suse.de>

PR middle-end/87314
* match.pd (cmp (convert1?@2 addr@0) (convert2? addr@1)):
Handle STRING_CST vs DECL or STRING_CST.

* gcc.dg/pr87314-1.c: New testcase.

From-SVN: r270845
gcc/ChangeLog
gcc/match.pd
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr87314-1.c [new file with mode: 0644]