public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/94905] New: Bogus warning -Werror=maybe-uninitialized
@ 2020-05-01 16:25 bug-apl at gnu dot org
  2020-05-01 22:41 ` [Bug c++/94905] " glisse at gcc dot gnu.org
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: bug-apl at gnu dot org @ 2020-05-01 16:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94905

            Bug ID: 94905
           Summary: Bogus warning -Werror=maybe-uninitialized
           Product: gcc
           Version: 9.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bug-apl at gnu dot org
  Target Milestone: ---

Hi,

as of g++ 9.3.0 when building GNU APL, g++ emits bogus warnings of type
-Werror=maybe-uninitialized.

Apparently the compiler issues these warnings simply because it is lacking
enough context to really figure out what is happening (e.g. if the supposedly
missing initialization is happening in a different function).

An example is:

https://svn.savannah.gnu.org/viewvc/apl/trunk/src/Shape.hh?view=markup

Shape.hh:133:18: error: ‘shape_Z.Shape::rho[axis]’ may be used
uninitialized in this function [-Werror=maybe-uninitialized]
         if (rho[r])   { volume /= rho[r];  rho[r] = sh;  volume *=
rho[r]; }
             ~~~~~^

The line 133 is preceded by an assertion that verifies that rho[r] is
initialized. Apparently the compiler assumes that the initialization
of rho[r] on the right of = happens after the test of rho[r] on the left
of =. It completely ignores, however, the fact that rho[r] was simply
updated and was initialized already before the function (set_shape_item)
was called.

May I kindly request to move this kind of warnings away from -Wall to
-Wextra ?

According to "man g++":

      -Wall
           This enables all the warnings about constructions that some users
           consider questionable, and that are easy to avoid (or modify to
           prevent the warning), even in conjunction with macros.  This also

In the example above there is no "easy to avoid" way to fix the warning.

Kind regards,
Jürgen Sauermann
Maintainer of GNU APL

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/94905] Bogus warning -Werror=maybe-uninitialized
  2020-05-01 16:25 [Bug c++/94905] New: Bogus warning -Werror=maybe-uninitialized bug-apl at gnu dot org
@ 2020-05-01 22:41 ` glisse at gcc dot gnu.org
  2020-05-03 13:28 ` bug-apl at gnu dot org
                   ` (17 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: glisse at gcc dot gnu.org @ 2020-05-01 22:41 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94905

--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> ---
Several of us asked, and it was rejected. Your next step is to provide a
self-contained testcase (preprocessed sources?). You may also want to check if
it still warns in gcc-10.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/94905] Bogus warning -Werror=maybe-uninitialized
  2020-05-01 16:25 [Bug c++/94905] New: Bogus warning -Werror=maybe-uninitialized bug-apl at gnu dot org
  2020-05-01 22:41 ` [Bug c++/94905] " glisse at gcc dot gnu.org
@ 2020-05-03 13:28 ` bug-apl at gnu dot org
  2020-05-03 15:02 ` asolokha at gmx dot com
                   ` (16 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: bug-apl at gnu dot org @ 2020-05-03 13:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94905

--- Comment #2 from Dr. Jürgen Sauermann <bug-apl at gnu dot org> ---
I checked different g++ versions; the problem occurs in versions 9, 10, and 11
of g++ but not in version 8.

I tried to shrink the code to the bare minimum but if I do so then the warning
is no longer emitted.

I noticed that the warning has become more verbose in g++ version 11.
Before version 11 the warning said (one example of many):


Shape.hh:133:18: error: ‘shape_Z.Shape::rho[axis]’ may be used
uninitialized in this function [-Werror=maybe-uninitialized]
         if (rho[r])   { volume /= rho[r];  rho[r] = sh;  volume
*= rho[r]; }
                  ~~~~~^

In version g++ 11 it now says:


Shape.hh: In member function ‘virtual Token Bif_F12_FORMAT::eval_B(Value_P)’:
Shape.hh:133:18: error: ‘shape_Z.Shape::rho[<unknown>]’ may be used
uninitialized in this function [-Werror=maybe-uninitialized]
  133 |         if (rho[r])   { volume /= rho[r];  rho[r] = sh;  volume *=
rho[r]; }
      |             ~~~~~^


The <unknown> in shape_Z.Shape::rho[<unknown>] above is the function argument
'axis' of the function set_shape_item(axis, length) inside which the warning is
being issued.

This suggests that the warning is issued whenever the compiler is unable to
statically determine if some function argument (the vector index 'axiss' in
this case) is inside or outside the initialized region of a vector.

This seems to be overly picky; I would normally assume that the data members of
a class are always initialized. If not then the constructor and not any member
function should emit a warning.

Thanks for your attention and for gcc/g++
Jürgen Sauermann

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/94905] Bogus warning -Werror=maybe-uninitialized
  2020-05-01 16:25 [Bug c++/94905] New: Bogus warning -Werror=maybe-uninitialized bug-apl at gnu dot org
  2020-05-01 22:41 ` [Bug c++/94905] " glisse at gcc dot gnu.org
  2020-05-03 13:28 ` bug-apl at gnu dot org
@ 2020-05-03 15:02 ` asolokha at gmx dot com
  2020-05-03 16:10 ` bug-apl at gnu dot org
                   ` (15 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: asolokha at gmx dot com @ 2020-05-03 15:02 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94905

Arseny Solokha <asolokha at gmx dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |asolokha at gmx dot com

--- Comment #3 from Arseny Solokha <asolokha at gmx dot com> ---
The best I've been able to come up with is the following, reduced from APL 1.8:

enum { MAX_RANK = 8 };

struct Shape {
  Shape(int len) { rho[0] = len; }

  Shape(Shape &other) {
    for (int r = 0; r < MAX_RANK; ++r)
      rho[r] = other.rho[r];
  }

  Shape insert_axis() const;

  int rho[MAX_RANK];
};

int insert_axis_len;

Shape Shape::insert_axis() const {
  {
    Shape ret(insert_axis_len);
    return ret;
  }
}

% g++-10.1.0 -O2 -Wall -Werror -c fojcdnsn.cc
fojcdnsn.cc: In member function 'Shape Shape::insert_axis() const':
fojcdnsn.cc:8:27: error: ''target_mem_ref' not supported by
dump_expr<expression error>' may be used uninitialized in this function
[-Werror=maybe-uninitialized]
    8 |       rho[r] = other.rho[r];
      |                ~~~~~~~~~~~^

That's with gcc-10.1.0-RC-20200430; I failed to reproduce it at all with gcc 9.
However, without preprocessed source provided by the reporter it's impossible
to tell whether that's the issue in question.

So please, provide a self-contained testcase! It's not even necessary to
minimize it, as in many cases it's easy to do with tools like C-Reduce or newly
emerged C-Vise and can later be done by developers themselves. But without the
testcase developers cannot and likely won't do anything about the issue you
have in the first place.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/94905] Bogus warning -Werror=maybe-uninitialized
  2020-05-01 16:25 [Bug c++/94905] New: Bogus warning -Werror=maybe-uninitialized bug-apl at gnu dot org
                   ` (2 preceding siblings ...)
  2020-05-03 15:02 ` asolokha at gmx dot com
@ 2020-05-03 16:10 ` bug-apl at gnu dot org
  2020-05-03 16:16 ` bug-apl at gnu dot org
                   ` (14 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: bug-apl at gnu dot org @ 2020-05-03 16:10 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94905

--- Comment #4 from Dr. Jürgen Sauermann <bug-apl at gnu dot org> ---
Created attachment 48431
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48431&action=edit
preprocessed apl-Bif_F12_FORMAT.cc, gzip'ed

preprocessed source file apl-Bif_F12_FORMAT.cc

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/94905] Bogus warning -Werror=maybe-uninitialized
  2020-05-01 16:25 [Bug c++/94905] New: Bogus warning -Werror=maybe-uninitialized bug-apl at gnu dot org
                   ` (3 preceding siblings ...)
  2020-05-03 16:10 ` bug-apl at gnu dot org
@ 2020-05-03 16:16 ` bug-apl at gnu dot org
  2020-05-03 16:26 ` asolokha at gmx dot com
                   ` (13 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: bug-apl at gnu dot org @ 2020-05-03 16:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94905

--- Comment #5 from Dr. Jürgen Sauermann <bug-apl at gnu dot org> ---
Hi,

above is one preprocessed source file for which the warning has occurred. g++
version was 11.0.0 (latest from github). 

Compiled with:

g++ -E -DHAVE_CONFIG_H -I. -I..    -Wall -I sql -Werror -I/usr/include
-I/usr/include/postgresql   -rdynamic -g -O2 -MT apl-Bif_F12_FORMAT.o -MD -MP
-MF .deps/apl-Bif_F12_FORMAT.Tpo -c -o apl-Bif_F12_FORMAT.cxx


Interestingly, if I compile the file apl-Bif_F12_FORMAT.cxx separately (with
-Wall) then the warning does not show up.

Not sure how I can create a testcase file other than preprocessing or
minimizing it.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/94905] Bogus warning -Werror=maybe-uninitialized
  2020-05-01 16:25 [Bug c++/94905] New: Bogus warning -Werror=maybe-uninitialized bug-apl at gnu dot org
                   ` (4 preceding siblings ...)
  2020-05-03 16:16 ` bug-apl at gnu dot org
@ 2020-05-03 16:26 ` asolokha at gmx dot com
  2020-07-02 15:47 ` moller at mollerware dot com
                   ` (12 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: asolokha at gmx dot com @ 2020-05-03 16:26 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94905

--- Comment #6 from Arseny Solokha <asolokha at gmx dot com> ---
Thank you.

(In reply to Dr. Jürgen Sauermann from comment #5)
> Not sure how I can create a testcase file other than preprocessing or
> minimizing it.

Of course preprocessing is what you've been asked to do. It is stressed in the
bug filing instructions[1].

[1] https://gcc.gnu.org/bugs

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/94905] Bogus warning -Werror=maybe-uninitialized
  2020-05-01 16:25 [Bug c++/94905] New: Bogus warning -Werror=maybe-uninitialized bug-apl at gnu dot org
                   ` (5 preceding siblings ...)
  2020-05-03 16:26 ` asolokha at gmx dot com
@ 2020-07-02 15:47 ` moller at mollerware dot com
  2020-07-02 15:51 ` moller at mollerware dot com
                   ` (11 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: moller at mollerware dot com @ 2020-07-02 15:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94905

Chris Moller <moller at mollerware dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |moller at mollerware dot com

--- Comment #7 from Chris Moller <moller at mollerware dot com> ---
A little follow-up:

What's happening is that in gcc/tree-ssa-uninit.c, in
pass_late_warn_uninitialized::execute (function *fun),
warn_uninitialized_vars() is called with an argument of 1.  Then, in
warn_uninitialized_vars(), walk_aliased_vdefs (&ref, use, check_defs, &data,
NULL,&fentry_reached, limit); is called, returning with fentry_reached set to
false, which then leads to the warning being generated.

In gcc/tree-ssa-alias.c, in walk_aliased_vdefs_1(), *function_entry_reached =
true; is never reached because gimple_nop_p (def_stmt) never returns true.

I've attached a bit of preprocessed sample code that reliably fails with 

g++ -DHAVE_CONFIG_H -I. -I..    -Wall -I sql -Werror     -rdynamic -g -O2 -MT
apl-Shape.o -MD -MP -MF .deps/apl-Shape.Tpo -c Shape-preprocessed.cc

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/94905] Bogus warning -Werror=maybe-uninitialized
  2020-05-01 16:25 [Bug c++/94905] New: Bogus warning -Werror=maybe-uninitialized bug-apl at gnu dot org
                   ` (6 preceding siblings ...)
  2020-07-02 15:47 ` moller at mollerware dot com
@ 2020-07-02 15:51 ` moller at mollerware dot com
  2020-09-03 18:34 ` manu at gcc dot gnu.org
                   ` (10 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: moller at mollerware dot com @ 2020-07-02 15:51 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94905

--- Comment #8 from Chris Moller <moller at mollerware dot com> ---
Created attachment 48825
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48825&action=edit
Preprocessed testcase

gunzip  then compile with 

g++ -DHAVE_CONFIG_H -I. -I..    -Wall -I sql -Werror     -rdynamic -g -O2 -MT
apl-Shape.o -MD -MP -MF .deps/apl-Shape.Tpo -c Shape-preprocessed.cc

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/94905] Bogus warning -Werror=maybe-uninitialized
  2020-05-01 16:25 [Bug c++/94905] New: Bogus warning -Werror=maybe-uninitialized bug-apl at gnu dot org
                   ` (7 preceding siblings ...)
  2020-07-02 15:51 ` moller at mollerware dot com
@ 2020-09-03 18:34 ` manu at gcc dot gnu.org
  2020-09-03 18:46 ` [Bug c++/94905] [10 Regression] " manu at gcc dot gnu.org
                   ` (9 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: manu at gcc dot gnu.org @ 2020-09-03 18:34 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94905

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manu at gcc dot gnu.org

--- Comment #9 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Chris Moller from comment #8)
> Created attachment 48825 [details]
> Preprocessed testcase

This is way too large, nobody can analyze what is really going on with such a
large testcase: https://gcc.gnu.org/wiki/A_guide_to_testcase_reduction

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/94905] [10 Regression] Bogus warning -Werror=maybe-uninitialized
  2020-05-01 16:25 [Bug c++/94905] New: Bogus warning -Werror=maybe-uninitialized bug-apl at gnu dot org
                   ` (8 preceding siblings ...)
  2020-09-03 18:34 ` manu at gcc dot gnu.org
@ 2020-09-03 18:46 ` manu at gcc dot gnu.org
  2021-04-08 16:34 ` [Bug tree-optimization/94905] [10/11 " jason at gcc dot gnu.org
                   ` (8 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: manu at gcc dot gnu.org @ 2020-09-03 18:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94905

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Bogus warning               |[10 Regression] Bogus
                   |-Werror=maybe-uninitialized |warning
                   |                            |-Werror=maybe-uninitialized
   Target Milestone|---                         |10.4
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-09-03
             Status|UNCONFIRMED                 |NEW

--- Comment #10 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Arseny Solokha from comment #3)
> The best I've been able to come up with is the following, reduced from APL
> 1.8:

It is warning about this, but it should not warn:

  # DEBUG rD.2406 => (intD.9) (ivtmp.24_6 /[ex] 4) + 1
  [./example.cpp:8:27] # VUSE <.MEM_11>
  pretmp_8 = MEM[(intD.9 *)&retD.2381 + ivtmp.24_13 * 1];


This is regression but not sure when it was introduced.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug tree-optimization/94905] [10/11 Regression] Bogus warning -Werror=maybe-uninitialized
  2020-05-01 16:25 [Bug c++/94905] New: Bogus warning -Werror=maybe-uninitialized bug-apl at gnu dot org
                   ` (9 preceding siblings ...)
  2020-09-03 18:46 ` [Bug c++/94905] [10 Regression] " manu at gcc dot gnu.org
@ 2021-04-08 16:34 ` jason at gcc dot gnu.org
  2022-01-21 13:41 ` rguenth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: jason at gcc dot gnu.org @ 2021-04-08 16:34 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94905

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu.org
          Component|c++                         |tree-optimization

--- Comment #11 from Jason Merrill <jason at gcc dot gnu.org> ---
Changing component.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug tree-optimization/94905] [10/11 Regression] Bogus warning -Werror=maybe-uninitialized
  2020-05-01 16:25 [Bug c++/94905] New: Bogus warning -Werror=maybe-uninitialized bug-apl at gnu dot org
                   ` (10 preceding siblings ...)
  2021-04-08 16:34 ` [Bug tree-optimization/94905] [10/11 " jason at gcc dot gnu.org
@ 2022-01-21 13:41 ` rguenth at gcc dot gnu.org
  2022-01-21 13:41 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-21 13:41 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94905

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |msebor at gcc dot gnu.org
      Known to fail|                            |11.2.1
      Known to work|                            |12.0
           Keywords|                            |needs-bisection
   Last reconfirmed|2020-09-03 00:00:00         |2022-1-21
            Summary|[10/11/12 Regression] Bogus |[10/11 Regression] Bogus
                   |warning                     |warning
                   |-Werror=maybe-uninitialized |-Werror=maybe-uninitialized

--- Comment #12 from Richard Biener <rguenth at gcc dot gnu.org> ---
The diagnostic is gone with GCC 12 as we there pattern-recognize a memcpy:

  <bb 2> [local count: 119292720]:
  insert_axis_len.0_1 = insert_axis_len;
  ret ={v} {CLOBBER};
  ret.rho[0] = insert_axis_len.0_1;
  __builtin_memcpy (_3(D), &ret, 32);
  ret ={v} {CLOBBER};
  return _3(D);

and the partial uninitialized read from it is not what the uninit pass can
diagnose (it's memory walking stops at the first may-def, it does not
prune must-def ranges).  But even with -fno-tree-loop-distribute-patterns
-fno-tree-vectorize where we get similar IL as with GCC 11 we do not warn so I
wonder
what fixed it on trunk (when you add those options).

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug tree-optimization/94905] [10/11 Regression] Bogus warning -Werror=maybe-uninitialized
  2020-05-01 16:25 [Bug c++/94905] New: Bogus warning -Werror=maybe-uninitialized bug-apl at gnu dot org
                   ` (11 preceding siblings ...)
  2022-01-21 13:41 ` rguenth at gcc dot gnu.org
@ 2022-01-21 13:41 ` rguenth at gcc dot gnu.org
  2022-01-21 13:43 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-21 13:41 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94905

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug tree-optimization/94905] [10/11 Regression] Bogus warning -Werror=maybe-uninitialized
  2020-05-01 16:25 [Bug c++/94905] New: Bogus warning -Werror=maybe-uninitialized bug-apl at gnu dot org
                   ` (12 preceding siblings ...)
  2022-01-21 13:41 ` rguenth at gcc dot gnu.org
@ 2022-01-21 13:43 ` rguenth at gcc dot gnu.org
  2022-01-31 14:50 ` marxin at gcc dot gnu.org
                   ` (4 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-21 13:43 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94905

--- Comment #13 from Richard Biener <rguenth at gcc dot gnu.org> ---
Oh, and the reduced testcase is correct to warn on I think.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug tree-optimization/94905] [10/11 Regression] Bogus warning -Werror=maybe-uninitialized
  2020-05-01 16:25 [Bug c++/94905] New: Bogus warning -Werror=maybe-uninitialized bug-apl at gnu dot org
                   ` (13 preceding siblings ...)
  2022-01-21 13:43 ` rguenth at gcc dot gnu.org
@ 2022-01-31 14:50 ` marxin at gcc dot gnu.org
  2022-04-07  9:39 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-01-31 14:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94905

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org
           Keywords|needs-bisection             |

--- Comment #14 from Martin Liška <marxin at gcc dot gnu.org> ---
> 
> and the partial uninitialized read from it is not what the uninit pass can
> diagnose (it's memory walking stops at the first may-def, it does not
> prune must-def ranges).  But even with -fno-tree-loop-distribute-patterns
> -fno-tree-vectorize where we get similar IL as with GCC 11 we do not warn so
> I wonder
> what fixed it on trunk (when you add those options).

It was fixed with r11-3659-gac1c65ad1a16d83e.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug tree-optimization/94905] [10/11 Regression] Bogus warning -Werror=maybe-uninitialized
  2020-05-01 16:25 [Bug c++/94905] New: Bogus warning -Werror=maybe-uninitialized bug-apl at gnu dot org
                   ` (14 preceding siblings ...)
  2022-01-31 14:50 ` marxin at gcc dot gnu.org
@ 2022-04-07  9:39 ` rguenth at gcc dot gnu.org
  2022-04-07 10:01 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-04-07  9:39 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94905

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |needs-bisection

--- Comment #15 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #14)
> > 
> > and the partial uninitialized read from it is not what the uninit pass can
> > diagnose (it's memory walking stops at the first may-def, it does not
> > prune must-def ranges).  But even with -fno-tree-loop-distribute-patterns
> > -fno-tree-vectorize where we get similar IL as with GCC 11 we do not warn so
> > I wonder
> > what fixed it on trunk (when you add those options).
> 
> It was fixed with r11-3659-gac1c65ad1a16d83e.

But the original testcase still warns on the branch but not trunk, so that
cannot be it.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug tree-optimization/94905] [10/11 Regression] Bogus warning -Werror=maybe-uninitialized
  2020-05-01 16:25 [Bug c++/94905] New: Bogus warning -Werror=maybe-uninitialized bug-apl at gnu dot org
                   ` (15 preceding siblings ...)
  2022-04-07  9:39 ` rguenth at gcc dot gnu.org
@ 2022-04-07 10:01 ` jakub at gcc dot gnu.org
  2022-06-28 10:40 ` jakub at gcc dot gnu.org
  2023-07-07 10:37 ` [Bug tree-optimization/94905] [11 " rguenth at gcc dot gnu.org
  18 siblings, 0 replies; 20+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-04-07 10:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94905

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #16 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
On the trunk it stopped with r12-4240-g2b8453c401b699ed93c085d0413ab4b5030bcdb8
But with -O2 -W -Wall fno-tree-vectorize it still warns even with current
trunk.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug tree-optimization/94905] [10/11 Regression] Bogus warning -Werror=maybe-uninitialized
  2020-05-01 16:25 [Bug c++/94905] New: Bogus warning -Werror=maybe-uninitialized bug-apl at gnu dot org
                   ` (16 preceding siblings ...)
  2022-04-07 10:01 ` jakub at gcc dot gnu.org
@ 2022-06-28 10:40 ` jakub at gcc dot gnu.org
  2023-07-07 10:37 ` [Bug tree-optimization/94905] [11 " rguenth at gcc dot gnu.org
  18 siblings, 0 replies; 20+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94905

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.4                        |10.5

--- Comment #17 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug tree-optimization/94905] [11 Regression] Bogus warning -Werror=maybe-uninitialized
  2020-05-01 16:25 [Bug c++/94905] New: Bogus warning -Werror=maybe-uninitialized bug-apl at gnu dot org
                   ` (17 preceding siblings ...)
  2022-06-28 10:40 ` jakub at gcc dot gnu.org
@ 2023-07-07 10:37 ` rguenth at gcc dot gnu.org
  18 siblings, 0 replies; 20+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07 10:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94905

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.5                        |11.5

--- Comment #18 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10 branch is being closed.

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2023-07-07 10:37 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-01 16:25 [Bug c++/94905] New: Bogus warning -Werror=maybe-uninitialized bug-apl at gnu dot org
2020-05-01 22:41 ` [Bug c++/94905] " glisse at gcc dot gnu.org
2020-05-03 13:28 ` bug-apl at gnu dot org
2020-05-03 15:02 ` asolokha at gmx dot com
2020-05-03 16:10 ` bug-apl at gnu dot org
2020-05-03 16:16 ` bug-apl at gnu dot org
2020-05-03 16:26 ` asolokha at gmx dot com
2020-07-02 15:47 ` moller at mollerware dot com
2020-07-02 15:51 ` moller at mollerware dot com
2020-09-03 18:34 ` manu at gcc dot gnu.org
2020-09-03 18:46 ` [Bug c++/94905] [10 Regression] " manu at gcc dot gnu.org
2021-04-08 16:34 ` [Bug tree-optimization/94905] [10/11 " jason at gcc dot gnu.org
2022-01-21 13:41 ` rguenth at gcc dot gnu.org
2022-01-21 13:41 ` rguenth at gcc dot gnu.org
2022-01-21 13:43 ` rguenth at gcc dot gnu.org
2022-01-31 14:50 ` marxin at gcc dot gnu.org
2022-04-07  9:39 ` rguenth at gcc dot gnu.org
2022-04-07 10:01 ` jakub at gcc dot gnu.org
2022-06-28 10:40 ` jakub at gcc dot gnu.org
2023-07-07 10:37 ` [Bug tree-optimization/94905] [11 " rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).