public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/94655] New: Implicit assignment operator triggers stringop-overflow warning
@ 2020-04-18 23:35 drahflow at gmx dot de
  2020-04-20  7:10 ` [Bug tree-optimization/94655] [10 Regression] " rguenth at gcc dot gnu.org
                   ` (22 more replies)
  0 siblings, 23 replies; 24+ messages in thread
From: drahflow at gmx dot de @ 2020-04-18 23:35 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94655
           Summary: Implicit assignment operator triggers
                    stringop-overflow warning
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: drahflow at gmx dot de
  Target Milestone: ---

Running:

g++-10 -O3 -W -Wall -Wextra -Werror --std=c++2a -c problem.c++

on this code:

#include <functional>
#include <memory>
#include <string>

struct A {
  std::string strA; // remove this line and it works
  char arr[16]; // remove this line and it works
  std::string strB; // remove this line and it works
};

const A getA(); // remove "const" and it works

void frob(const std::function<void()> &);

struct B {
  int i; // remove this line and it works
  A data;

  B() { }

  void f();
};

void B::f() {
  frob([this]() {
    data = getA();
  });

  // data = getA(); // comment out the frob(...) and use this line, it works
}

results in:

In member function ‘A& A::operator=(const A&)’,
    inlined from ‘B::f()::<lambda()>’ at problem.c++:26:17,
    inlined from ‘constexpr _Res std::__invoke_impl(std::__invoke_other, _Fn&&,
_Args&& ...) [with _Res = void; _Fn = B::f()::<lambda()>&; _Args = {}]’ at
/usr/include/c++/10/bits/invoke.h:60:36,
    inlined from ‘constexpr std::enable_if_t<is_invocable_r_v<_Res, _Callable,
_Args ...>, _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = void;
_Callable = B::f()::<lambda()>&; _Args = {}]’ at
/usr/include/c++/10/bits/invoke.h:110:28,
    inlined from ‘static _Res std::_Function_handler<_Res(_ArgTypes ...),
_Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = void;
_Functor = B::f()::<lambda()>; _ArgTypes = {}]’ at
/usr/include/c++/10/bits/std_function.h:291:30:
problem.c++:5:8: error: writing 16 bytes into a region of size 0
[-Werror=stringop-overflow=]
    5 | struct A {
      |        ^
problem.c++: In static member function ‘static _Res
std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const
std::_Any_data&, _ArgTypes&& ...) [with _Res = void; _Functor =
B::f()::<lambda()>; _ArgTypes = {}]’:
problem.c++:6:15: note: at offset 0 to object ‘A::strA’ with size 32 declared
here
    6 |   std::string strA; // remove this line and it works
      |               ^~~~


Using instead -O2, it works.
Using instead g++9, it works.

% g++-10 --version
g++-10 (Debian 10-20200222-1) 10.0.1 20200222 (experimental) [master revision
01af7e0a0c2:487fe13f218:e99b18cf7101f205bfdd9f0f29ed51caaec52779]

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

* [Bug tree-optimization/94655] [10 Regression] Implicit assignment operator triggers stringop-overflow warning
  2020-04-18 23:35 [Bug c++/94655] New: Implicit assignment operator triggers stringop-overflow warning drahflow at gmx dot de
@ 2020-04-20  7:10 ` rguenth at gcc dot gnu.org
  2020-04-20  7:24 ` [Bug tree-optimization/94655] [10 Regression] Implicit assignment operator triggers stringop-overflow warning since r10-5451-gef29b12cfbb4979a marxin at gcc dot gnu.org
                   ` (21 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-04-20  7:10 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |msebor at gcc dot gnu.org
   Target Milestone|---                         |10.0
           Keywords|                            |diagnostic
          Component|c++                         |tree-optimization
            Summary|Implicit assignment         |[10 Regression] Implicit
                   |operator triggers           |assignment operator
                   |stringop-overflow warning   |triggers stringop-overflow
                   |                            |warning

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

* [Bug tree-optimization/94655] [10 Regression] Implicit assignment operator triggers stringop-overflow warning since r10-5451-gef29b12cfbb4979a
  2020-04-18 23:35 [Bug c++/94655] New: Implicit assignment operator triggers stringop-overflow warning drahflow at gmx dot de
  2020-04-20  7:10 ` [Bug tree-optimization/94655] [10 Regression] " rguenth at gcc dot gnu.org
@ 2020-04-20  7:24 ` marxin at gcc dot gnu.org
  2020-04-20  8:52 ` jakub at gcc dot gnu.org
                   ` (20 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-04-20  7:24 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |9.3.0
   Last reconfirmed|                            |2020-04-20
                 CC|                            |marxin at gcc dot gnu.org
      Known to fail|                            |10.0
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
            Summary|[10 Regression] Implicit    |[10 Regression] Implicit
                   |assignment operator         |assignment operator
                   |triggers stringop-overflow  |triggers stringop-overflow
                   |warning                     |warning since
                   |                            |r10-5451-gef29b12cfbb4979a

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed, started with r10-5451-gef29b12cfbb4979a.

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

* [Bug tree-optimization/94655] [10 Regression] Implicit assignment operator triggers stringop-overflow warning since r10-5451-gef29b12cfbb4979a
  2020-04-18 23:35 [Bug c++/94655] New: Implicit assignment operator triggers stringop-overflow warning drahflow at gmx dot de
  2020-04-20  7:10 ` [Bug tree-optimization/94655] [10 Regression] " rguenth at gcc dot gnu.org
  2020-04-20  7:24 ` [Bug tree-optimization/94655] [10 Regression] Implicit assignment operator triggers stringop-overflow warning since r10-5451-gef29b12cfbb4979a marxin at gcc dot gnu.org
@ 2020-04-20  8:52 ` jakub at gcc dot gnu.org
  2020-04-20 15:35 ` msebor at gcc dot gnu.org
                   ` (19 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-04-20  8:52 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
We must have dups for this, the warning relies on something that the IL doesn't
provide. fre4 changes:
   _8 = &MEM[(struct A *)_5 + 8B].strA;
   std::__cxx11::basic_string<char>::_M_assign (_8, &D.113592.strA);

   <bb 3> [local count: 1073741824]:
   _9 = &MEM[(struct A *)_5 + 8B].arr;
-  _31 = &MEM[(struct A *)_5 + 8B];
-  _29 = _31 + 32;
-  _24 = &D.113592 + 33;
-  _21 = _29 - _24;
+  _29 = _8 + 32;
+  _21 = _29 - &MEM <const struct A> [(void *)&D.113592 + 33B];
...
-  vectp.110_64 = &D.113592 + 32;
-  _69 = &MEM[(struct A *)_5 + 8B];
-  vectp.113_68 = _69 + 32;
-  vect__13.111_67 = MEM <const vector(16) char> [(const char *)vectp.110_64];
-  MEM <vector(16) char> [(char *)vectp.113_68] = vect__13.111_67;
-  vectp.109_66 = vectp.110_64 + 16;
-  vectp.112_71 = vectp.113_68 + 16;
-  ivtmp_74 = 1;
+  vect__13.111_67 = MEM <const vector(16) char> [(const char *)&D.113592 +
32B];
+  MEM <vector(16) char> [(char *)_29] = vect__13.111_67;
+  vectp.112_71 = _29 + 16;

and the warning warns because it thinks the store uses the strA + 32 pointer to
store the 16 bytes (vectorized), but the user code doesn't do that, only the
value numbering found that the value is equal to that.

Perhaps SCCVN could try to modify the &something.field into &MEM_REF[..., off]
if it decides to reuse it in some context that doesn't use the same field base,
but not sure how hard would that be.

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

* [Bug tree-optimization/94655] [10 Regression] Implicit assignment operator triggers stringop-overflow warning since r10-5451-gef29b12cfbb4979a
  2020-04-18 23:35 [Bug c++/94655] New: Implicit assignment operator triggers stringop-overflow warning drahflow at gmx dot de
                   ` (2 preceding siblings ...)
  2020-04-20  8:52 ` jakub at gcc dot gnu.org
@ 2020-04-20 15:35 ` msebor at gcc dot gnu.org
  2020-04-20 15:42 ` jakub at gcc dot gnu.org
                   ` (18 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: msebor at gcc dot gnu.org @ 2020-04-20 15:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> ---
Using the base object in the MEM_REF instead of the member when accessing
another member should certainly fix it.

Another option might be to somehow mark up these synthesized stores (e.g., by
setting some currently unused bit) to make it clear they were emitted for valid
source code.  I'd prefer the former option since that would preserve the
validity (in the C/C++ sense) of the source code.

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

* [Bug tree-optimization/94655] [10 Regression] Implicit assignment operator triggers stringop-overflow warning since r10-5451-gef29b12cfbb4979a
  2020-04-18 23:35 [Bug c++/94655] New: Implicit assignment operator triggers stringop-overflow warning drahflow at gmx dot de
                   ` (3 preceding siblings ...)
  2020-04-20 15:35 ` msebor at gcc dot gnu.org
@ 2020-04-20 15:42 ` jakub at gcc dot gnu.org
  2020-04-20 16:57 ` msebor at gcc dot gnu.org
                   ` (17 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-04-20 15:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I don't see how it makes a difference between whether it is a store created by
the vectorizer or some original user store.
What matters is what ADDR_EXPR picks up SCCVN for the base, and it will pick up
the first one which has the same value; if there are multiple fields starting
at the same address, it can pick any of them.

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

* [Bug tree-optimization/94655] [10 Regression] Implicit assignment operator triggers stringop-overflow warning since r10-5451-gef29b12cfbb4979a
  2020-04-18 23:35 [Bug c++/94655] New: Implicit assignment operator triggers stringop-overflow warning drahflow at gmx dot de
                   ` (4 preceding siblings ...)
  2020-04-20 15:42 ` jakub at gcc dot gnu.org
@ 2020-04-20 16:57 ` msebor at gcc dot gnu.org
  2020-04-21 20:10 ` law at redhat dot com
                   ` (16 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: msebor at gcc dot gnu.org @ 2020-04-20 16:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Martin Sebor <msebor at gcc dot gnu.org> ---
We want stores by user code to be diagnosed based on strict language rules
(e.g., accessing a member via a reference to another member).  To do that we
either have to teach the middle end to avoid taking shortcuts that make the IL
look like invalid user code, or be able to apply more permissive rules for
stores synthesized by it.

I assume the former is what you meant by "modify the &something.field into
&MEM_REF[..., off]."  My comment was in support of that because, provided the
latter part actually meant "&MEM_REF[something, offsetoff (typeof (something),
field)], it could be added to and subtracted from to obtain pointers to any
other member of "something."  (In contrast, &something.field + N is only valid
for N <= sizeof something.field (flexible arrays aside)).

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

* [Bug tree-optimization/94655] [10 Regression] Implicit assignment operator triggers stringop-overflow warning since r10-5451-gef29b12cfbb4979a
  2020-04-18 23:35 [Bug c++/94655] New: Implicit assignment operator triggers stringop-overflow warning drahflow at gmx dot de
                   ` (5 preceding siblings ...)
  2020-04-20 16:57 ` msebor at gcc dot gnu.org
@ 2020-04-21 20:10 ` law at redhat dot com
  2020-04-21 21:27 ` msebor at gcc dot gnu.org
                   ` (15 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: law at redhat dot com @ 2020-04-21 20:10 UTC (permalink / raw)
  To: gcc-bugs

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

Jeffrey A. Law <law at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|NEW                         |RESOLVED
                 CC|                            |law at redhat dot com

--- Comment #6 from Jeffrey A. Law <law at redhat dot com> ---
Fundamentally if we're relying on the type of the MEM_REF, then we're going to
run into problems.  It simply does not map back to what the user originally
wrote.  That's the key issue Richi and Jakub are raising.

pr94675 is another recently reported example.  In that case as well FRE creates
a MEM_REF from address arithmetic, but the type isn't useful and leads to a
false positive out of bounds array warning.  Forwprop can do this stuff as
well, and I suspect if we were to dig elsewhere we'd find more examples.

While I don't want to lose these warnings, they are proving problematical in
the MEM_REF cases and I'm wondering if we need a distinct knob to disable them
in the MEM_REF cases given the fundamental incompatibility between giving good
diagnostics and the actions of various optimization passes.


In the immediate term I'm going to mark this as a dup of 94675 (and any others
I encounter in my BZ wanderings).

*** This bug has been marked as a duplicate of bug 94675 ***

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

* [Bug tree-optimization/94655] [10 Regression] Implicit assignment operator triggers stringop-overflow warning since r10-5451-gef29b12cfbb4979a
  2020-04-18 23:35 [Bug c++/94655] New: Implicit assignment operator triggers stringop-overflow warning drahflow at gmx dot de
                   ` (6 preceding siblings ...)
  2020-04-21 20:10 ` law at redhat dot com
@ 2020-04-21 21:27 ` msebor at gcc dot gnu.org
  2020-04-30 16:14 ` [Bug tree-optimization/94655] [10/11 " msebor at gcc dot gnu.org
                   ` (14 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: msebor at gcc dot gnu.org @ 2020-04-21 21:27 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |NEW
         Resolution|DUPLICATE                   |---

--- Comment #7 from Martin Sebor <msebor at gcc dot gnu.org> ---
The root cause in this case or the solution are not the same as in bug 94675. 
The MEM_REF type is the type of the access, so it's correct to rely on it for
the size of the access.  The problem here is that the first MEM_REF pointer
operand doesn't point to the actual destination of the access: it points to one
member of the struct but as a result of adding the offset to it the access is
actually to the subsequent member.  It's as if the final store in valid code
like this:

  struct S { char i; char a[8], b[8]; };

  void g (struct S *p)
  {
    typedef __attribute__ ((vector_size (8))) char V;

    char *pa = p->a + 8;
    char *pb = p->b;

    *(V*)pb = (V) {0};   // pb points to p->b
  }

were transformed into:

  pa_2 = &MEM <char[8]> [(void *)p_1(D) + 9B];
  MEM[(V *)pa_2] = { 0, 0, 0, 0, 0, 0, 0, 0 };   // but here store is into
(p->a + 9)

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

* [Bug tree-optimization/94655] [10/11 Regression] Implicit assignment operator triggers stringop-overflow warning since r10-5451-gef29b12cfbb4979a
  2020-04-18 23:35 [Bug c++/94655] New: Implicit assignment operator triggers stringop-overflow warning drahflow at gmx dot de
                   ` (7 preceding siblings ...)
  2020-04-21 21:27 ` msebor at gcc dot gnu.org
@ 2020-04-30 16:14 ` msebor at gcc dot gnu.org
  2020-05-07 11:56 ` jakub at gcc dot gnu.org
                   ` (13 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: msebor at gcc dot gnu.org @ 2020-04-30 16:14 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |arnd at linaro dot org

--- Comment #8 from Martin Sebor <msebor at gcc dot gnu.org> ---
*** Bug 94881 has been marked as a duplicate of this bug. ***

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

* [Bug tree-optimization/94655] [10/11 Regression] Implicit assignment operator triggers stringop-overflow warning since r10-5451-gef29b12cfbb4979a
  2020-04-18 23:35 [Bug c++/94655] New: Implicit assignment operator triggers stringop-overflow warning drahflow at gmx dot de
                   ` (8 preceding siblings ...)
  2020-04-30 16:14 ` [Bug tree-optimization/94655] [10/11 " msebor at gcc dot gnu.org
@ 2020-05-07 11:56 ` jakub at gcc dot gnu.org
  2020-07-21 14:55 ` msebor at gcc dot gnu.org
                   ` (12 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-05-07 11:56 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.0                        |10.2

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.1 has been released.

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

* [Bug tree-optimization/94655] [10/11 Regression] Implicit assignment operator triggers stringop-overflow warning since r10-5451-gef29b12cfbb4979a
  2020-04-18 23:35 [Bug c++/94655] New: Implicit assignment operator triggers stringop-overflow warning drahflow at gmx dot de
                   ` (9 preceding siblings ...)
  2020-05-07 11:56 ` jakub at gcc dot gnu.org
@ 2020-07-21 14:55 ` msebor at gcc dot gnu.org
  2020-07-21 20:08 ` msebor at gcc dot gnu.org
                   ` (11 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: msebor at gcc dot gnu.org @ 2020-07-21 14:55 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |freddy77 at gmail dot com

--- Comment #10 from Martin Sebor <msebor at gcc dot gnu.org> ---
*** Bug 96259 has been marked as a duplicate of this bug. ***

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

* [Bug tree-optimization/94655] [10/11 Regression] Implicit assignment operator triggers stringop-overflow warning since r10-5451-gef29b12cfbb4979a
  2020-04-18 23:35 [Bug c++/94655] New: Implicit assignment operator triggers stringop-overflow warning drahflow at gmx dot de
                   ` (10 preceding siblings ...)
  2020-07-21 14:55 ` msebor at gcc dot gnu.org
@ 2020-07-21 20:08 ` msebor at gcc dot gnu.org
  2020-07-21 20:46 ` pinskia at gcc dot gnu.org
                   ` (10 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: msebor at gcc dot gnu.org @ 2020-07-21 20:08 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Sebor <msebor at gcc dot gnu.org> changed:

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

--- Comment #11 from Martin Sebor <msebor at gcc dot gnu.org> ---
*** Bug 95988 has been marked as a duplicate of this bug. ***

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

* [Bug tree-optimization/94655] [10/11 Regression] Implicit assignment operator triggers stringop-overflow warning since r10-5451-gef29b12cfbb4979a
  2020-04-18 23:35 [Bug c++/94655] New: Implicit assignment operator triggers stringop-overflow warning drahflow at gmx dot de
                   ` (11 preceding siblings ...)
  2020-07-21 20:08 ` msebor at gcc dot gnu.org
@ 2020-07-21 20:46 ` pinskia at gcc dot gnu.org
  2020-07-23  6:51 ` rguenth at gcc dot gnu.org
                   ` (9 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: pinskia at gcc dot gnu.org @ 2020-07-21 20:46 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |major

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

* [Bug tree-optimization/94655] [10/11 Regression] Implicit assignment operator triggers stringop-overflow warning since r10-5451-gef29b12cfbb4979a
  2020-04-18 23:35 [Bug c++/94655] New: Implicit assignment operator triggers stringop-overflow warning drahflow at gmx dot de
                   ` (12 preceding siblings ...)
  2020-07-21 20:46 ` pinskia at gcc dot gnu.org
@ 2020-07-23  6:51 ` rguenth at gcc dot gnu.org
  2021-01-14  8:38 ` rguenth at gcc dot gnu.org
                   ` (8 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-07-23  6:51 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.2                        |10.3

--- Comment #12 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10.2 is released, adjusting target milestone.

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

* [Bug tree-optimization/94655] [10/11 Regression] Implicit assignment operator triggers stringop-overflow warning since r10-5451-gef29b12cfbb4979a
  2020-04-18 23:35 [Bug c++/94655] New: Implicit assignment operator triggers stringop-overflow warning drahflow at gmx dot de
                   ` (13 preceding siblings ...)
  2020-07-23  6:51 ` rguenth at gcc dot gnu.org
@ 2021-01-14  8:38 ` rguenth at gcc dot gnu.org
  2021-01-14 20:11 ` msebor at gcc dot gnu.org
                   ` (7 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-01-14  8:38 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

* [Bug tree-optimization/94655] [10/11 Regression] Implicit assignment operator triggers stringop-overflow warning since r10-5451-gef29b12cfbb4979a
  2020-04-18 23:35 [Bug c++/94655] New: Implicit assignment operator triggers stringop-overflow warning drahflow at gmx dot de
                   ` (14 preceding siblings ...)
  2021-01-14  8:38 ` rguenth at gcc dot gnu.org
@ 2021-01-14 20:11 ` msebor at gcc dot gnu.org
  2021-01-21 22:34 ` [Bug tree-optimization/94655] [10/11 Regression] -Wstringop-overflow on implicit string assignment with vectorized char store msebor at gcc dot gnu.org
                   ` (6 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-01-14 20:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Martin Sebor <msebor at gcc dot gnu.org> ---
*** Bug 96984 has been marked as a duplicate of this bug. ***

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

* [Bug tree-optimization/94655] [10/11 Regression] -Wstringop-overflow on implicit string assignment with vectorized char store
  2020-04-18 23:35 [Bug c++/94655] New: Implicit assignment operator triggers stringop-overflow warning drahflow at gmx dot de
                   ` (15 preceding siblings ...)
  2021-01-14 20:11 ` msebor at gcc dot gnu.org
@ 2021-01-21 22:34 ` msebor at gcc dot gnu.org
  2021-01-21 23:48 ` msebor at gcc dot gnu.org
                   ` (5 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-01-21 22:34 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=96963
            Summary|[10/11 Regression] Implicit |[10/11 Regression]
                   |assignment operator         |-Wstringop-overflow on
                   |triggers stringop-overflow  |implicit string assignment
                   |warning since               |with vectorized char store
                   |r10-5451-gef29b12cfbb4979a  |
   Last reconfirmed|2020-04-20 00:00:00         |2021-1-21
      Known to fail|10.0                        |10.2.0, 11.0
           Assignee|unassigned at gcc dot gnu.org      |msebor at gcc dot gnu.org

--- Comment #14 from Martin Sebor <msebor at gcc dot gnu.org> ---
Still present in GCC 11.  My hack for pr96963 also suppresses this warning as
well.

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

* [Bug tree-optimization/94655] [10/11 Regression] -Wstringop-overflow on implicit string assignment with vectorized char store
  2020-04-18 23:35 [Bug c++/94655] New: Implicit assignment operator triggers stringop-overflow warning drahflow at gmx dot de
                   ` (16 preceding siblings ...)
  2021-01-21 22:34 ` [Bug tree-optimization/94655] [10/11 Regression] -Wstringop-overflow on implicit string assignment with vectorized char store msebor at gcc dot gnu.org
@ 2021-01-21 23:48 ` msebor at gcc dot gnu.org
  2021-03-04  0:05 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-01-21 23:48 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch

--- Comment #15 from Martin Sebor <msebor at gcc dot gnu.org> ---
Patch: https://gcc.gnu.org/pipermail/gcc-patches/2021-January/564059.html

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

* [Bug tree-optimization/94655] [10/11 Regression] -Wstringop-overflow on implicit string assignment with vectorized char store
  2020-04-18 23:35 [Bug c++/94655] New: Implicit assignment operator triggers stringop-overflow warning drahflow at gmx dot de
                   ` (17 preceding siblings ...)
  2021-01-21 23:48 ` msebor at gcc dot gnu.org
@ 2021-03-04  0:05 ` cvs-commit at gcc dot gnu.org
  2021-04-08 12:02 ` [Bug tree-optimization/94655] [10 " rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-03-04  0:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #16 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Sebor <msebor@gcc.gnu.org>:

https://gcc.gnu.org/g:8d57bdadd2d9c2e5c95515ca7a583d7b407b55c4

commit r11-7497-g8d57bdadd2d9c2e5c95515ca7a583d7b407b55c4
Author: Martin Sebor <msebor@redhat.com>
Date:   Wed Mar 3 16:56:45 2021 -0700

    Correct a workaround for vectorized stores.

    Resolves:
    PR middle-end/96963 - -Wstringop-overflow false positive with
-ftree-vectorize when assigning consecutive char struct members
    PR middle-end/94655 - -Wstringop-overflow on implicit string assignment
with vectorized char store

    gcc/ChangeLog:

            PR middle-end/96963
            PR middle-end/94655
            * builtins.c (handle_array_ref): New helper.
            (handle_mem_ref): New helper.
            (compute_objsize_r): Factor out ARRAY_REF and MEM_REF handling
            into new helper functions.  Correct a workaround for vectorized
            assignments.

    gcc/testsuite/ChangeLog:

            PR middle-end/96963
            PR middle-end/94655
            * gcc.dg/Wstringop-overflow-47.c: Xfail tests.
            * gcc.dg/Wstringop-overflow-65.c: New test.
            * gcc.dg/Warray-bounds-69.c: Same.

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

* [Bug tree-optimization/94655] [10 Regression] -Wstringop-overflow on implicit string assignment with vectorized char store
  2020-04-18 23:35 [Bug c++/94655] New: Implicit assignment operator triggers stringop-overflow warning drahflow at gmx dot de
                   ` (18 preceding siblings ...)
  2021-03-04  0:05 ` cvs-commit at gcc dot gnu.org
@ 2021-04-08 12:02 ` rguenth at gcc dot gnu.org
  2022-03-17 19:54 ` msebor at gcc dot gnu.org
                   ` (2 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-04-08 12:02 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #17 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10.3 is being released, retargeting bugs to GCC 10.4.

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

* [Bug tree-optimization/94655] [10 Regression] -Wstringop-overflow on implicit string assignment with vectorized char store
  2020-04-18 23:35 [Bug c++/94655] New: Implicit assignment operator triggers stringop-overflow warning drahflow at gmx dot de
                   ` (19 preceding siblings ...)
  2021-04-08 12:02 ` [Bug tree-optimization/94655] [10 " rguenth at gcc dot gnu.org
@ 2022-03-17 19:54 ` msebor at gcc dot gnu.org
  2022-06-28 10:40 ` jakub at gcc dot gnu.org
  2023-07-07  8:49 ` rguenth at gcc dot gnu.org
  22 siblings, 0 replies; 24+ messages in thread
From: msebor at gcc dot gnu.org @ 2022-03-17 19:54 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|msebor at gcc dot gnu.org          |unassigned at gcc dot gnu.org
             Status|ASSIGNED                    |NEW

--- Comment #18 from Martin Sebor <msebor at gcc dot gnu.org> ---
I'm no longer planning to bakcport the fix.

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

* [Bug tree-optimization/94655] [10 Regression] -Wstringop-overflow on implicit string assignment with vectorized char store
  2020-04-18 23:35 [Bug c++/94655] New: Implicit assignment operator triggers stringop-overflow warning drahflow at gmx dot de
                   ` (20 preceding siblings ...)
  2022-03-17 19:54 ` msebor at gcc dot gnu.org
@ 2022-06-28 10:40 ` jakub at gcc dot gnu.org
  2023-07-07  8:49 ` rguenth at gcc dot gnu.org
  22 siblings, 0 replies; 24+ 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=94655

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

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

--- Comment #19 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] 24+ messages in thread

* [Bug tree-optimization/94655] [10 Regression] -Wstringop-overflow on implicit string assignment with vectorized char store
  2020-04-18 23:35 [Bug c++/94655] New: Implicit assignment operator triggers stringop-overflow warning drahflow at gmx dot de
                   ` (21 preceding siblings ...)
  2022-06-28 10:40 ` jakub at gcc dot gnu.org
@ 2023-07-07  8:49 ` rguenth at gcc dot gnu.org
  22 siblings, 0 replies; 24+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07  8:49 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
   Target Milestone|10.5                        |11.0
             Status|NEW                         |RESOLVED
      Known to fail|                            |10.5.0

--- Comment #20 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed for GCC 11.

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

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

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-18 23:35 [Bug c++/94655] New: Implicit assignment operator triggers stringop-overflow warning drahflow at gmx dot de
2020-04-20  7:10 ` [Bug tree-optimization/94655] [10 Regression] " rguenth at gcc dot gnu.org
2020-04-20  7:24 ` [Bug tree-optimization/94655] [10 Regression] Implicit assignment operator triggers stringop-overflow warning since r10-5451-gef29b12cfbb4979a marxin at gcc dot gnu.org
2020-04-20  8:52 ` jakub at gcc dot gnu.org
2020-04-20 15:35 ` msebor at gcc dot gnu.org
2020-04-20 15:42 ` jakub at gcc dot gnu.org
2020-04-20 16:57 ` msebor at gcc dot gnu.org
2020-04-21 20:10 ` law at redhat dot com
2020-04-21 21:27 ` msebor at gcc dot gnu.org
2020-04-30 16:14 ` [Bug tree-optimization/94655] [10/11 " msebor at gcc dot gnu.org
2020-05-07 11:56 ` jakub at gcc dot gnu.org
2020-07-21 14:55 ` msebor at gcc dot gnu.org
2020-07-21 20:08 ` msebor at gcc dot gnu.org
2020-07-21 20:46 ` pinskia at gcc dot gnu.org
2020-07-23  6:51 ` rguenth at gcc dot gnu.org
2021-01-14  8:38 ` rguenth at gcc dot gnu.org
2021-01-14 20:11 ` msebor at gcc dot gnu.org
2021-01-21 22:34 ` [Bug tree-optimization/94655] [10/11 Regression] -Wstringop-overflow on implicit string assignment with vectorized char store msebor at gcc dot gnu.org
2021-01-21 23:48 ` msebor at gcc dot gnu.org
2021-03-04  0:05 ` cvs-commit at gcc dot gnu.org
2021-04-08 12:02 ` [Bug tree-optimization/94655] [10 " rguenth at gcc dot gnu.org
2022-03-17 19:54 ` msebor at gcc dot gnu.org
2022-06-28 10:40 ` jakub at gcc dot gnu.org
2023-07-07  8:49 ` 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).