middle-end/103248 - fix RDIV_EXPR handling with fixed point
authorRichard Biener <rguenther@suse.de>
Tue, 16 Nov 2021 10:47:26 +0000 (11:47 +0100)
committerRichard Biener <rguenther@suse.de>
Fri, 19 Nov 2021 08:35:57 +0000 (09:35 +0100)
commitfb15abdc9b61a0b7fa24a37f85d19dc449cfd5bf
tree627582ad67e37ad59b162f1af7ab6c808a9de018
parent0fc859f5efcb4624a8b4ffdbf34d63972af179a8
middle-end/103248 - fix RDIV_EXPR handling with fixed point

This fixes the previous adjustment to operation_could_trap_helper_p
where I failed to realize that RDIV_EXPR is also used for
fixed-point types.  It also fixes that handling by properly
checking for a fixed_zerop divisor.

2021-11-16  Richard Biener  <rguenther@suse.de>

PR middle-end/103248
* tree-eh.c (operation_could_trap_helper_p): Properly handle
fixed-point RDIV_EXPR.

* gcc.dg/pr103248.c: New testcase.
gcc/testsuite/gcc.dg/pr103248.c [new file with mode: 0644]
gcc/tree-eh.c