aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorAndrew Pinski <quic_apinski@quicinc.com>2024-10-26 02:14:18 -0700
committerAndrew Pinski <quic_apinski@quicinc.com>2024-10-26 11:44:39 -0700
commit5596572b6bf72031de888301ebfe8e984df04dc9 (patch)
tree893ad12049f57649f13a807923a11f24b2843c4d /gcc/fortran
parent4727bfb37701f3fef98a5f8b60dcd2daa82e8143 (diff)
downloadgcc-5596572b6bf72031de888301ebfe8e984df04dc9.zip
gcc-5596572b6bf72031de888301ebfe8e984df04dc9.tar.gz
gcc-5596572b6bf72031de888301ebfe8e984df04dc9.tar.bz2
tree: Mark PAREN_EXPR and VEC_DUPLICATE_EXPR as non-trapping [PR117234]
While looking to fix a possible trapping issue in PHI-OPT's factor, I noticed that some tree codes could be marked as trapping even though they don't have a possibility to trap. In the case of PAREN_EXPR, it is basically a nop except when it comes to association across it so it can't trap. In the case of VEC_DUPLICATE_EXPR, it is similar to a CONSTRUCTOR, so it can't trap. This fixes those 2 issues and adds 4 testcases, 2 which are specific to aarch64 since the only way to get a VEC_DUPLICATE_EXPR is to use intrinsics currently. Build and tested for aarch64-linux-gnu. PR tree-optimization/117234 gcc/ChangeLog: * tree-eh.cc (operation_could_trap_helper_p): Treat PAREN_EXPR and VEC_DUPLICATE_EXPR like constructing expressions. gcc/testsuite/ChangeLog: * g++.dg/eh/noncall-fp-1.C: New test. * g++.target/aarch64/sve/noncall-eh-fp-1.C: New test. * gcc.dg/tree-ssa/trapping-1.c: New test. * gcc.target/aarch64/sve/trapping-1.c: New test. Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
Diffstat (limited to 'gcc/fortran')
0 files changed, 0 insertions, 0 deletions