]> git.ipfire.org Git - thirdparty/gcc.git/commit
gimplify: Call gimple_boolify on IFN_ASSUME argument [PR107368]
authorJakub Jelinek <jakub@redhat.com>
Tue, 25 Oct 2022 08:42:59 +0000 (10:42 +0200)
committerJakub Jelinek <jakub@redhat.com>
Tue, 25 Oct 2022 08:45:04 +0000 (10:45 +0200)
commit44e18da4d9c5faf189fe876986927be12ae4e4c4
treec786cca9cde8271c2ee439a9c2f93312802e6480
parent593632051f48a20bdc685d00d168f064d808bd7b
gimplify: Call gimple_boolify on IFN_ASSUME argument [PR107368]

The following testcase ICEs in C, because assume attribute condition
has int type rather than bool and the gimplification into GIMPLE_ASSUME
assigns it into a bool variable.

Fixed by calling gimple_boolify.

2022-10-25  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/107368
* gimplify.cc (gimplify_call_expr): For complex IFN_ASSUME
conditions call gimple_boolify on the condition.

* gcc.dg/attr-assume-5.c: New test.
gcc/gimplify.cc
gcc/testsuite/gcc.dg/attr-assume-5.c [new file with mode: 0644]