public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51431] New: [4.5/4.6/4.7 Regression] ICE with invalid use of abstract class
@ 2011-12-06 0:44 reichelt at gcc dot gnu.org
2011-12-06 0:45 ` [Bug c++/51431] [4.4/4.5/4.6/4.7 " reichelt at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: reichelt at gcc dot gnu.org @ 2011-12-06 0:44 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51431
Bug #: 51431
Summary: [4.5/4.6/4.7 Regression] ICE with invalid use of
abstract class
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: reichelt@gcc.gnu.org
The following invalid code snippet triggers an ICE since GCC 4.4.0:
===================================
struct A
{
virtual void foo() = 0;
};
struct B
{
A a;
B() : a() {}
};
===================================
bug.cc:8:5: error: cannot declare field 'B::a' to be of abstract type 'A'
bug.cc:1:8: note: because the following virtual functions are pure within
'A':
bug.cc:3:16: note: virtual void A::foo()
bug.cc: In constructor 'B::B()':
bug.cc:9:11: error: cannot allocate an object of abstract type 'A'
bug.cc:1:8: note: since type 'A' has pure virtual functions
bug.cc:9:11: internal compiler error: tree check: expected aggr_init_expr, have
error_mark in build_value_init, at cp/init.c:365
Please submit a full bug report, [etc.]
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/51431] [4.4/4.5/4.6/4.7 Regression] ICE with invalid use of abstract class
2011-12-06 0:44 [Bug c++/51431] New: [4.5/4.6/4.7 Regression] ICE with invalid use of abstract class reichelt at gcc dot gnu.org
@ 2011-12-06 0:45 ` reichelt at gcc dot gnu.org
2011-12-06 14:29 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: reichelt at gcc dot gnu.org @ 2011-12-06 0:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51431
Volker Reichelt <reichelt at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |error-recovery,
| |ice-checking,
| |ice-on-invalid-code
Target Milestone|--- |4.4.7
Summary|[4.5/4.6/4.7 Regression] |[4.4/4.5/4.6/4.7
|ICE with invalid use of |Regression] ICE with
|abstract class |invalid use of abstract
| |class
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/51431] [4.4/4.5/4.6/4.7 Regression] ICE with invalid use of abstract class
2011-12-06 0:44 [Bug c++/51431] New: [4.5/4.6/4.7 Regression] ICE with invalid use of abstract class reichelt at gcc dot gnu.org
2011-12-06 0:45 ` [Bug c++/51431] [4.4/4.5/4.6/4.7 " reichelt at gcc dot gnu.org
@ 2011-12-06 14:29 ` rguenth at gcc dot gnu.org
2011-12-06 16:29 ` paolo.carlini at oracle dot com
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-12-06 14:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51431
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P5
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/51431] [4.4/4.5/4.6/4.7 Regression] ICE with invalid use of abstract class
2011-12-06 0:44 [Bug c++/51431] New: [4.5/4.6/4.7 Regression] ICE with invalid use of abstract class reichelt at gcc dot gnu.org
2011-12-06 0:45 ` [Bug c++/51431] [4.4/4.5/4.6/4.7 " reichelt at gcc dot gnu.org
2011-12-06 14:29 ` rguenth at gcc dot gnu.org
@ 2011-12-06 16:29 ` paolo.carlini at oracle dot com
2011-12-06 17:13 ` paolo at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-12-06 16:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51431
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2011-12-06
AssignedTo|unassigned at gcc dot |paolo.carlini at oracle dot
|gnu.org |com
Ever Confirmed|0 |1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/51431] [4.4/4.5/4.6/4.7 Regression] ICE with invalid use of abstract class
2011-12-06 0:44 [Bug c++/51431] New: [4.5/4.6/4.7 Regression] ICE with invalid use of abstract class reichelt at gcc dot gnu.org
` (2 preceding siblings ...)
2011-12-06 16:29 ` paolo.carlini at oracle dot com
@ 2011-12-06 17:13 ` paolo at gcc dot gnu.org
2011-12-06 17:15 ` [Bug c++/51431] [4.4/4.5/4.6 " paolo.carlini at oracle dot com
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: paolo at gcc dot gnu.org @ 2011-12-06 17:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51431
--- Comment #1 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2011-12-06 17:12:35 UTC ---
Author: paolo
Date: Tue Dec 6 17:12:17 2011
New Revision: 182055
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182055
Log:
/cp
2011-12-06 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51431
* init.c (build_value_init): Check build_aggr_init_expr return
value for error_mark_node.
/testsuite
2011-12-06 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51431
* g++.dg/other/abstract3.C: New.
Added:
trunk/gcc/testsuite/g++.dg/other/abstract3.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/init.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/51431] [4.4/4.5/4.6 Regression] ICE with invalid use of abstract class
2011-12-06 0:44 [Bug c++/51431] New: [4.5/4.6/4.7 Regression] ICE with invalid use of abstract class reichelt at gcc dot gnu.org
` (3 preceding siblings ...)
2011-12-06 17:13 ` paolo at gcc dot gnu.org
@ 2011-12-06 17:15 ` paolo.carlini at oracle dot com
2011-12-06 17:15 ` paolo.carlini at oracle dot com
2011-12-07 7:43 ` [Bug c++/51431] [4.7 " reichelt at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-12-06 17:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51431
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.4.7 |4.7.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/51431] [4.4/4.5/4.6 Regression] ICE with invalid use of abstract class
2011-12-06 0:44 [Bug c++/51431] New: [4.5/4.6/4.7 Regression] ICE with invalid use of abstract class reichelt at gcc dot gnu.org
` (4 preceding siblings ...)
2011-12-06 17:15 ` [Bug c++/51431] [4.4/4.5/4.6 " paolo.carlini at oracle dot com
@ 2011-12-06 17:15 ` paolo.carlini at oracle dot com
2011-12-07 7:43 ` [Bug c++/51431] [4.7 " reichelt at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-12-06 17:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51431
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Summary|[4.4/4.5/4.6/4.7 |[4.4/4.5/4.6 Regression]
|Regression] ICE with |ICE with invalid use of
|invalid use of abstract |abstract class
|class |
--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-12-06 17:14:57 UTC ---
Fixed for 4.7.0.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/51431] [4.7 Regression] ICE with invalid use of abstract class
2011-12-06 0:44 [Bug c++/51431] New: [4.5/4.6/4.7 Regression] ICE with invalid use of abstract class reichelt at gcc dot gnu.org
` (5 preceding siblings ...)
2011-12-06 17:15 ` paolo.carlini at oracle dot com
@ 2011-12-07 7:43 ` reichelt at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: reichelt at gcc dot gnu.org @ 2011-12-07 7:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51431
Volker Reichelt <reichelt at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.4/4.5/4.6 Regression] |[4.7 Regression] ICE with
|ICE with invalid use of |invalid use of abstract
|abstract class |class
--- Comment #3 from Volker Reichelt <reichelt at gcc dot gnu.org> 2011-12-07 07:42:40 UTC ---
Just for clarification:
The bug only occurred on trunk and not since 4.4.0 as I wrote above.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-12-07 7:43 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-06 0:44 [Bug c++/51431] New: [4.5/4.6/4.7 Regression] ICE with invalid use of abstract class reichelt at gcc dot gnu.org
2011-12-06 0:45 ` [Bug c++/51431] [4.4/4.5/4.6/4.7 " reichelt at gcc dot gnu.org
2011-12-06 14:29 ` rguenth at gcc dot gnu.org
2011-12-06 16:29 ` paolo.carlini at oracle dot com
2011-12-06 17:13 ` paolo at gcc dot gnu.org
2011-12-06 17:15 ` [Bug c++/51431] [4.4/4.5/4.6 " paolo.carlini at oracle dot com
2011-12-06 17:15 ` paolo.carlini at oracle dot com
2011-12-07 7:43 ` [Bug c++/51431] [4.7 " reichelt 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).