Hi,
After more study of all the discussion so far and the corresponding code for
suppress_warning, I think the following suggestion
Should be the best approach right now for this issue:
> SET_EXPR_LOCATION (tmp_dst, UNKNOWN_LOCATION);
> suppress_warning (tmp_dst,
On Fri, Feb 25, 2022 at 11:12:13AM +0100, Richard Biener wrote:
> On Fri, 25 Feb 2022, Jakub Jelinek wrote:
>
> > On Fri, Feb 25, 2022 at 10:31:50AM +0100, Richard Biener wrote:
> > > I think it's used as fallback for UNKNOWN_LOCATION, but if we "invent"
> > > a creative location for the
On Fri, 25 Feb 2022, Jakub Jelinek wrote:
> On Fri, Feb 25, 2022 at 10:31:50AM +0100, Richard Biener wrote:
> > I think it's used as fallback for UNKNOWN_LOCATION, but if we "invent"
> > a creative location for the artificial stmt it will of course
> > affect other stmts/expressions using that
On Fri, Feb 25, 2022 at 10:31:50AM +0100, Richard Biener wrote:
> I think it's used as fallback for UNKNOWN_LOCATION, but if we "invent"
> a creative location for the artificial stmt it will of course
> affect other stmts/expressions using that location.
>
> > I think it will work.
>
> Yes, I
On Fri, 25 Feb 2022, Jakub Jelinek wrote:
> On Fri, Feb 25, 2022 at 10:13:33AM +0100, Richard Biener via Gcc-patches
> wrote:
> > I meant
> >
> > /* Set the no_warning flag of STMT to NO_WARNING. */
> >
> > static inline void
> > gimple_set_no_warning (gimple *stmt, bool no_warning)
> > {
> >
On Fri, Feb 25, 2022 at 10:13:33AM +0100, Richard Biener via Gcc-patches wrote:
> I meant
>
> /* Set the no_warning flag of STMT to NO_WARNING. */
>
> static inline void
> gimple_set_no_warning (gimple *stmt, bool no_warning)
> {
> stmt->no_warning = (unsigned) no_warning;
> }
>
> on the
On Fri, 25 Feb 2022, Jakub Jelinek wrote:
> On Fri, Feb 25, 2022 at 08:11:40AM +0100, Richard Biener via Gcc-patches
> wrote:
> > On Thu, 24 Feb 2022, Qing Zhao wrote:
> >
> > > I briefly checked all the usages of suppress_warning within the current
> > > gcc,
> > > and see that most of them
On Fri, Feb 25, 2022 at 08:11:40AM +0100, Richard Biener via Gcc-patches wrote:
> On Thu, 24 Feb 2022, Qing Zhao wrote:
>
> > I briefly checked all the usages of suppress_warning within the current
> > gcc,
> > and see that most of them are not guarded by any condition.
> >
> > So, the
On Thu, 24 Feb 2022, Qing Zhao wrote:
> I briefly checked all the usages of suppress_warning within the current gcc,
> and see that most of them are not guarded by any condition.
>
> So, the current change should be fine without introducing new issues. -:)
>
> Another thing is, if we use
I briefly checked all the usages of suppress_warning within the current gcc,
and see that most of them are not guarded by any condition.
So, the current change should be fine without introducing new issues. -:)
Another thing is, if we use “warning_enable_at” to guard, I just checked,
this
On Thu, Feb 24, 2022 at 04:00:33PM +0100, Richard Biener wrote:
> > > --- a/gcc/gimple-fold.cc
> > > +++ b/gcc/gimple-fold.cc
> > > @@ -4379,7 +4379,12 @@ clear_padding_flush (clear_padding_struct *buf,
> > > bool full)
> > > else
> > > {
> > > src = make_ssa_name
On Thu, 24 Feb 2022, Jakub Jelinek wrote:
> On Thu, Feb 24, 2022 at 02:30:05PM +, Qing Zhao wrote:
> > PR middle-end/104550
> >
> > gcc/ChangeLog:
> >
> > * gimple-fold.cc (clear_padding_flush): Suppress warnings for new
> > created uses.
> >
> > gcc/testsuite/ChangeLog:
> >
>
On Thu, Feb 24, 2022 at 02:30:05PM +, Qing Zhao wrote:
> PR middle-end/104550
>
> gcc/ChangeLog:
>
> * gimple-fold.cc (clear_padding_flush): Suppress warnings for new
> created uses.
>
> gcc/testsuite/ChangeLog:
>
> * gcc.dg/auto-init-pr104550-1.c: New test.
>
Hi,
This is the 2nd version for this bug per our discussion.
Compared to the previous patch, this patch ONLY suppresses warnings for the
fake read that was introduced with folding.
The patch has been bootstrapped and regress tested on both x86 and aarch64.
Okay for trunk?
Thanks.
Qing
14 matches
Mail list logo