public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/60318] New: Documentation bug: C++ Misunderstandings: Implicit Copy-Assignment for Virtual Bases
@ 2014-02-22 18:09 JuergenGCC at bund dot us
  2021-08-30  3:16 ` [Bug c++/60318] " pinskia at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: JuergenGCC at bund dot us @ 2014-02-22 18:09 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60318
           Summary: Documentation bug: C++ Misunderstandings: Implicit
                    Copy-Assignment for Virtual Bases
           Product: gcc
           Version: unknown
               URL: http://gcc.gnu.org/onlinedocs/gcc/Copy-Assignment.html
            Status: UNCONFIRMED
          Severity: trivial
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: JuergenGCC at bund dot us

That document states "In the example, copying proceeds in the following order:
‘val’, ‘name’ (via strdup), ‘bval’, and ‘name’ again."
Instead, it should read: "In the example, copying proceeds in the following
order: ‘name’ (via strdup), ‘val’, ‘name’ again, and ‘bval’."
>From gcc-bugs-return-444636-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Feb 22 19:34:42 2014
Return-Path: <gcc-bugs-return-444636-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 1910 invoked by alias); 22 Feb 2014 19:34:40 -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 1889 invoked by uid 48); 22 Feb 2014 19:34:37 -0000
From: "su at cs dot ucdavis.edu" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/60319] New: wrong code (that hangs) by LTO at -Os and above on x86_64-linux-gnu
Date: Sat, 22 Feb 2014 19:34:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: lto
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: su at cs dot ucdavis.edu
X-Bugzilla-Status: UNCONFIRMED
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_id short_desc product version bug_status bug_severity priority component assigned_to reporter
Message-ID: <bug-60319-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: 2014-02/txt/msg02393.txt.bz2
Content-length: 1368

http://gcc.gnu.org/bugzilla/show_bug.cgi?id`319

            Bug ID: 60319
           Summary: wrong code (that hangs) by LTO at -Os and above on
                    x86_64-linux-gnu
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: su at cs dot ucdavis.edu

The current gcc trunk miscompiles the following code when using LTO at -Os and
above on x86_64-linux-gnu (both 32-bit and 64-bit modes).

This also affects the earlier versions of GCC from 4.6 to 4.8.

$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/usr/local/gcc-trunk
--enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
gcc version 4.9.0 20140222 (experimental) [trunk revision 208040] (GCC)
$
$ gcc-trunk -flto -O0 -c foo.c
$ gcc-trunk -flto -O0 -c main.c
$
$ gcc-trunk -flto -O1 foo.o main.o
$ a.out
$
$ gcc-trunk -flto -Os foo.o main.o
$ a.out
^C
$
$ cat foo.c
void foo (char c)
{
  for (c = 0; c >= 0; c++)
    ;
}
$ cat main.c
extern void foo (char c);

int main ()
{
 foo(0);
 return 0;
}


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

end of thread, other threads:[~2021-09-08 23:35 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-22 18:09 [Bug c++/60318] New: Documentation bug: C++ Misunderstandings: Implicit Copy-Assignment for Virtual Bases JuergenGCC at bund dot us
2021-08-30  3:16 ` [Bug c++/60318] " pinskia at gcc dot gnu.org
2021-08-31  8:42 ` redi at gcc dot gnu.org
2021-08-31  9:09 ` redi at gcc dot gnu.org
2021-09-08 21:34 ` cvs-commit at gcc dot gnu.org
2021-09-08 23:30 ` cvs-commit at gcc dot gnu.org
2021-09-08 23:31 ` cvs-commit at gcc dot gnu.org
2021-09-08 23:34 ` cvs-commit at gcc dot gnu.org
2021-09-08 23:35 ` redi 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).