public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/61687] New: [4.10 regression] -O PASS, -O2 report error
@ 2014-07-03 13:08 dimhen at gmail dot com
2014-07-03 14:43 ` [Bug c++/61687] " jakub at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: dimhen at gmail dot com @ 2014-07-03 13:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61687
Bug ID: 61687
Summary: [4.10 regression] -O PASS, -O2 report error
Product: gcc
Version: 4.10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: dimhen at gmail dot com
r212098 PASS
r212191 FAIL
r212258 FAIL
$ ~/bin/gcc_212191_wo_fold/bin/g++ -c -fpreprocessed -O n.ii
$ ~/bin/gcc_212191_wo_fold/bin/g++ -c -fpreprocessed -O2 n.ii
n.ii: In destructor 'virtual G::~G()':
n.ii:11:11: error: 'D::~D()' is private
virtual ~D();
^
n.ii:16:7: error: within this context
class G : D {
^
n.ii: At global scope:
n.ii:18:2: note: synthesized method 'virtual G::~G()' first required here
};
^
n.ii: In instantiation of 'B< <template-parameter-1-1> >::~B() [with
<template-parameter-1-1> = int]':
n.ii:13:7: required from here
n.ii:6:36: error: invalid use of incomplete type 'class A'
~B() { _M_impl._M_end_of_storage - 0; }
^
n.ii:1:7: note: forward declaration of 'class A'
class A;
^
$ cat n.ii
class A;
template <typename> struct B {
struct C {
A *_M_end_of_storage;
};
~B() { _M_impl._M_end_of_storage - 0; }
C _M_impl;
};
class D {
virtual ~D();
};
class F {
B<int> m_value;
};
class G : D {
F NPCadesImpl;
};
$ ~/bin/gcc_212191_wo_fold/bin/g++ -v
Using built-in specs.
COLLECT_GCC=/home/dimhen/bin/gcc_212191_wo_fold/bin/g++
COLLECT_LTO_WRAPPER=/home/dimhen/bin/gcc_212191_wo_fold/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.10.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /home/dimhen/src/gcc_current/configure
--prefix=/usr/local/gcc_current/ --enable-checking=yes,df,rtl,tree
--enable-languages=c,c++,lto --enable-plugin
--enable-version-specific-runtime-libs --enable-static
Thread model: posix
gcc version 4.10.0 20140701 (experimental) [trunk revision 212191] (GCC)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/61687] [4.10 regression] -O PASS, -O2 report error
2014-07-03 13:08 [Bug c++/61687] New: [4.10 regression] -O PASS, -O2 report error dimhen at gmail dot com
@ 2014-07-03 14:43 ` jakub at gcc dot gnu.org
2014-07-03 14:53 ` trippels at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-07-03 14:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61687
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org,
| |jason at gcc dot gnu.org
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r212174.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/61687] [4.10 regression] -O PASS, -O2 report error
2014-07-03 13:08 [Bug c++/61687] New: [4.10 regression] -O PASS, -O2 report error dimhen at gmail dot com
2014-07-03 14:43 ` [Bug c++/61687] " jakub at gcc dot gnu.org
@ 2014-07-03 14:53 ` trippels at gcc dot gnu.org
2014-07-07 11:12 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-07-03 14:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61687
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |trippels at gcc dot gnu.org
--- Comment #2 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
I think this issue is invalid. See PR61659 and
https://gcc.gnu.org/ml/gcc-patches/2014-07/msg00050.html and follow ups.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/61687] [4.10 regression] -O PASS, -O2 report error
2014-07-03 13:08 [Bug c++/61687] New: [4.10 regression] -O PASS, -O2 report error dimhen at gmail dot com
2014-07-03 14:43 ` [Bug c++/61687] " jakub at gcc dot gnu.org
2014-07-03 14:53 ` trippels at gcc dot gnu.org
@ 2014-07-07 11:12 ` rguenth at gcc dot gnu.org
2014-07-10 19:30 ` jason at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-07-07 11:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61687
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.10.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/61687] [4.10 regression] -O PASS, -O2 report error
2014-07-03 13:08 [Bug c++/61687] New: [4.10 regression] -O PASS, -O2 report error dimhen at gmail dot com
` (2 preceding siblings ...)
2014-07-07 11:12 ` rguenth at gcc dot gnu.org
@ 2014-07-10 19:30 ` jason at gcc dot gnu.org
2014-07-11 5:13 ` jason at gcc dot gnu.org
2014-07-30 17:28 ` jason at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2014-07-10 19:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61687
--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Thu Jul 10 19:29:59 2014
New Revision: 212436
URL: https://gcc.gnu.org/viewcvs?rev=212436&root=gcc&view=rev
Log:
PR c++/61659
PR c++/61687
gcc/c-family/
* c.opt (-fuse-all-virtuals): New.
gcc/cp/
* decl2.c (mark_all_virtuals): New variable.
(maybe_emit_vtables): Check it instead of flag_devirtualize.
(cp_write_global_declarations): Set it and give helpful diagnostic
if it introduces errors.
* class.c (finish_struct_1): Check it.
* decl.c (grokdeclarator): Clear virtualp after 'virtual auto' error.
Added:
trunk/gcc/testsuite/g++.dg/template/dtor9a.C
Modified:
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c.opt
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/class.c
trunk/gcc/cp/decl.c
trunk/gcc/cp/decl2.c
trunk/gcc/testsuite/g++.dg/template/dtor9.C
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/61687] [4.10 regression] -O PASS, -O2 report error
2014-07-03 13:08 [Bug c++/61687] New: [4.10 regression] -O PASS, -O2 report error dimhen at gmail dot com
` (3 preceding siblings ...)
2014-07-10 19:30 ` jason at gcc dot gnu.org
@ 2014-07-11 5:13 ` jason at gcc dot gnu.org
2014-07-30 17:28 ` jason at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2014-07-11 5:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61687
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org
--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed; now the testcase will be rejected at all optimization levels, or
accepted with -fno-use-all-virtuals.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/61687] [4.10 regression] -O PASS, -O2 report error
2014-07-03 13:08 [Bug c++/61687] New: [4.10 regression] -O PASS, -O2 report error dimhen at gmail dot com
` (4 preceding siblings ...)
2014-07-11 5:13 ` jason at gcc dot gnu.org
@ 2014-07-30 17:28 ` jason at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2014-07-30 17:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61687
--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Wed Jul 30 17:27:20 2014
New Revision: 213308
URL: https://gcc.gnu.org/viewcvs?rev=213308&root=gcc&view=rev
Log:
PR c++/61659
PR c++/61687
Revert:
gcc/c-family/
* c.opt (-fuse-all-virtuals): New.
gcc/cp/
* decl2.c (mark_all_virtuals): New variable.
(maybe_emit_vtables): Check it instead of flag_devirtualize.
(cp_write_global_declarations): Set it and give helpful diagnostic
if it introduces errors.
* class.c (finish_struct_1): Check it.
Removed:
trunk/gcc/testsuite/g++.dg/template/dtor9a.C
Modified:
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c.opt
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/class.c
trunk/gcc/cp/decl2.c
trunk/gcc/doc/invoke.texi
trunk/gcc/testsuite/g++.dg/template/dtor9.C
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-07-30 17:28 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-03 13:08 [Bug c++/61687] New: [4.10 regression] -O PASS, -O2 report error dimhen at gmail dot com
2014-07-03 14:43 ` [Bug c++/61687] " jakub at gcc dot gnu.org
2014-07-03 14:53 ` trippels at gcc dot gnu.org
2014-07-07 11:12 ` rguenth at gcc dot gnu.org
2014-07-10 19:30 ` jason at gcc dot gnu.org
2014-07-11 5:13 ` jason at gcc dot gnu.org
2014-07-30 17:28 ` jason 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).