[PATCH] PR tree-optimization/38943: Preserve trapping instructions with -fnon-call-exceptions

2021-07-08 Thread Roger Sayle
This patch addresses PR tree-optimization/38943 where gcc may optimize away trapping instructions even when -fnon-call-exceptions is specified. Interestingly this only affects the C compiler (when -fexceptions is not specified) as g++ (or -fexceptions) supports C++-style exception handling, where

Re: [PATCH] PR tree-optimization/38943: Preserve trapping instructions with -fnon-call-exceptions

2021-07-08 Thread Richard Biener via Gcc-patches
On Thu, Jul 8, 2021 at 11:54 AM Roger Sayle wrote: > > > This patch addresses PR tree-optimization/38943 where gcc may optimize > away trapping instructions even when -fnon-call-exceptions is specified. > Interestingly this only affects the C compiler (when -fexceptions is not > specified) as g++

Re: [PATCH] PR tree-optimization/38943: Preserve trapping instructions with -fnon-call-exceptions

2021-07-08 Thread Eric Botcazou
> This patch has been tested on x86_64-pc-linux-gnu with a "make > bootstrap" and "make -k check" with no new failures. This should > be relatively safe, as there are no changes in behaviour unless > the user explicitly specifies -fnon-call-exceptions, when the C > compiler then behaves more like