re PR middle-end/30172 (Operations with partly constant complex values not folded)
authorRichard Guenther <rguenther@suse.de>
Thu, 14 Dec 2006 13:12:11 +0000 (13:12 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 14 Dec 2006 13:12:11 +0000 (13:12 +0000)
commit9f5396713d9e188bad160c5816f3bfd21b6f32ca
tree7529cb235a0fc6106fa9a66695f0d7ae23d8c60f
parent85aef79f75e6be8e8a8d7a1111f6110b98a609ca
re PR middle-end/30172 (Operations with partly constant complex values not folded)

2006-12-14  Richard Guenther  <rguenther@suse.de>

PR middle-end/30172
* fold-const.c (fold_binary): Fold __complex__ ( x, 0 )
+ __complex__ ( 0, y ) to __complex__ ( x, y ).
Fold __complex__ (x, y) * +-I to __complex__ (-+y, +-x).

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

From-SVN: r119859
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr30172-1.c [new file with mode: 0644]