public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/57319] New: [4.8/4.9] Regression: bogus "defaulted move assignment for ... calls a non-trivial move assignment operator for virtual base ..."
@ 2013-05-17 20:20 ppluzhnikov at google dot com
  2013-05-20 13:37 ` [Bug c++/57319] " jason at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: ppluzhnikov at google dot com @ 2013-05-17 20:20 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57319

            Bug ID: 57319
           Summary: [4.8/4.9] Regression: bogus "defaulted move assignment
                    for ... calls a non-trivial move assignment operator
                    for virtual base ..."
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ppluzhnikov at google dot com

Google reference: b/9004260


Test case:

class A { };
class B: virtual A { };
class C: virtual B { };

class D: C
{
   void operator= (D &);
};


Using current trunk (@r199023):

g++ -c t.ii -std=c++11
t.ii:3:7: warning: defaulted move assignment for ‘C’ calls a non-trivial move
assignment operator for virtual base ‘B’ [-Wvirtual-move-assign]
 class C: virtual B { };
       ^

Richard Smith writes:

  The problem is that a defaulted move assignment for a class with two
  inheritance paths to a virtual base may move-assign that virtual base
  multiple times (and thus may lose state).

  However, this particular case *isn't* the problematic case, because
  (a) this sample code should not trigger the definition of C's move
      assignment operator, and
  (b) there is only one inheritance path from C to B, so it won't be
      move-assigned multiple times, and
  (c) the issue isn't with *non-trivial* move assignments, it's with
      *user-provided* move-assignments (for the virtual base or any of its
      subobjects), which B does not have.

  => This is a false positive.
>From gcc-bugs-return-422547-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri May 17 20:36:59 2013
Return-Path: <gcc-bugs-return-422547-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 645 invoked by alias); 17 May 2013 20:36:59 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 595 invoked by uid 48); 17 May 2013 20:36:55 -0000
From: "glisse at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/57318] optimizer takes several seconds on nested loops
Date: Fri, 17 May 2013 20:36:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: tree-optimization
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: glisse at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on everconfirmed
Message-ID: <bug-57318-4-PMDi8eOsy2@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-57318-4@http.gcc.gnu.org/bugzilla/>
References: <bug-57318-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-05/txt/msg01220.txt.bz2
Content-length: 584

http://gcc.gnu.org/bugzilla/show_bug.cgi?idW318

Marc Glisse <glisse at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-05-17
     Ever confirmed|0                           |1

--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> ---
All the time is spent in sched2, but the first strange thing is cunroll going
wild at -O2 (1000 iterations unrolled...).


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

end of thread, other threads:[~2013-05-31 10:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-17 20:20 [Bug c++/57319] New: [4.8/4.9] Regression: bogus "defaulted move assignment for ... calls a non-trivial move assignment operator for virtual base ..." ppluzhnikov at google dot com
2013-05-20 13:37 ` [Bug c++/57319] " jason at gcc dot gnu.org
2013-05-20 17:02 ` [Bug c++/57319] [4.8 Regression]: " jason at gcc dot gnu.org
2013-05-21  9:24 ` rguenth at gcc dot gnu.org
2013-05-23 17:33 ` ppluzhnikov at google dot com
2013-05-23 21:00 ` jason at gcc dot gnu.org
2013-05-23 21:42 ` richard-gccbugzilla at metafoo dot co.uk
2013-05-31 11:00 ` jakub 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).