]> git.ipfire.org Git - thirdparty/gcc.git/commit
match.pd: Fix indefinite recursion during exp-log transformations [PR118490]
authorSoumya AR <soumyaa@nvidia.com>
Mon, 27 Jan 2025 05:42:33 +0000 (11:12 +0530)
committerSoumya AR <soumyaa@nvidia.com>
Mon, 27 Jan 2025 05:44:37 +0000 (11:14 +0530)
commitd8a7f07f7cf008e359dad631aaae1028776b9e18
tree69e6bf092597bb632e1d42ba5518c9de72366319
parent1110ed77c1f22d5fc76df97d5353f27e4e91d5ae
match.pd: Fix indefinite recursion during exp-log transformations [PR118490]

This patch fixes the ICE caused when comparing log or exp of a constant with
another constant.

The transform is now restricted to cases where the resultant
log/exp (CST) can be constant folded.

Signed-off-by: Soumya AR <soumyaa@nvidia.com>
gcc/ChangeLog:

PR target/118490
* match.pd: Added ! to verify that log/exp (CST) can be constant folded.

gcc/testsuite/ChangeLog:

PR target/118490
* gcc.dg/pr118490.c: New test.
gcc/match.pd
gcc/testsuite/gcc.dg/pr [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr118490.c [new file with mode: 0644]