public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58837] New: [4.7/4.8/4.9 Regression] [c++11] ICE using invalid condition in static_assert
@ 2013-10-22 3:56 reichelt at gcc dot gnu.org
2013-10-23 8:06 ` [Bug c++/58837] " rguenth at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-10-22 3:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58837
Bug ID: 58837
Summary: [4.7/4.8/4.9 Regression] [c++11] ICE using invalid
condition in static_assert
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: reichelt at gcc dot gnu.org
The following invalid code snippet (compiled with "-std=c++11" or "-std=c++0x"
for older compilers) triggers an ICE sine GCC 4.6.0:
==============================
struct A {};
static_assert(A::~A, "");
==============================
bug.cc:3:25: internal compiler error: tree check: expected class 'expression',
have 'constant' (ptrmem_cst) in tree_operand_check, at tree.h:3107
static_assert(A::~A, "");
^
0xd16726 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
../../gcc/gcc/tree.c:9352
0x502208 expr_check
../../gcc/gcc/tree.h:2843
0x502208 tree_operand_check
../../gcc/gcc/tree.h:3107
0x7778d6 tree_operand_check
../../gcc/gcc/tree.h:2797
0x7778d6 c_common_truthvalue_conversion(unsigned int, tree_node*)
../../gcc/gcc/c-family/c-common.c:4627
0x695f17 ocp_convert(tree_node*, tree_node*, int, int, int)
../../gcc/gcc/cp/cvt.c:785
0x6e435f finish_static_assert(tree_node*, tree_node*, unsigned int, bool)
../../gcc/gcc/cp/semantics.c:6744
0x651d7b cp_parser_static_assert
../../gcc/gcc/cp/parser.c:11671
0x648151 cp_parser_block_declaration
../../gcc/gcc/cp/parser.c:10931
0x66f17e cp_parser_declaration
../../gcc/gcc/cp/parser.c:10832
0x66de9a cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:10718
0x66f7b6 cp_parser_translation_unit
../../gcc/gcc/cp/parser.c:3990
0x66f7b6 c_parse_file()
../../gcc/gcc/cp/parser.c:30970
0x78c623 c_common_parse_file()
../../gcc/gcc/c-family/c-opts.c:1046
Please submit a full bug report, [etc.]
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/58837] [4.7/4.8/4.9 Regression] [c++11] ICE using invalid condition in static_assert
2013-10-22 3:56 [Bug c++/58837] New: [4.7/4.8/4.9 Regression] [c++11] ICE using invalid condition in static_assert reichelt at gcc dot gnu.org
@ 2013-10-23 8:06 ` rguenth at gcc dot gnu.org
2013-11-19 10:24 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-10-23 8:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58837
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.7.4
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/58837] [4.7/4.8/4.9 Regression] [c++11] ICE using invalid condition in static_assert
2013-10-22 3:56 [Bug c++/58837] New: [4.7/4.8/4.9 Regression] [c++11] ICE using invalid condition in static_assert reichelt at gcc dot gnu.org
2013-10-23 8:06 ` [Bug c++/58837] " rguenth at gcc dot gnu.org
@ 2013-11-19 10:24 ` rguenth at gcc dot gnu.org
2014-01-27 15:11 ` jason at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-19 10:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58837
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-11-19
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/58837] [4.7/4.8/4.9 Regression] [c++11] ICE using invalid condition in static_assert
2013-10-22 3:56 [Bug c++/58837] New: [4.7/4.8/4.9 Regression] [c++11] ICE using invalid condition in static_assert reichelt at gcc dot gnu.org
2013-10-23 8:06 ` [Bug c++/58837] " rguenth at gcc dot gnu.org
2013-11-19 10:24 ` rguenth at gcc dot gnu.org
@ 2014-01-27 15:11 ` jason at gcc dot gnu.org
2014-01-28 4:31 ` jason at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2014-01-27 15:11 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58837
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
CC| |jason at gcc dot gnu.org
Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/58837] [4.7/4.8/4.9 Regression] [c++11] ICE using invalid condition in static_assert
2013-10-22 3:56 [Bug c++/58837] New: [4.7/4.8/4.9 Regression] [c++11] ICE using invalid condition in static_assert reichelt at gcc dot gnu.org
` (2 preceding siblings ...)
2014-01-27 15:11 ` jason at gcc dot gnu.org
@ 2014-01-28 4:31 ` jason at gcc dot gnu.org
2014-01-28 13:45 ` jason at gcc dot gnu.org
2014-01-28 13:53 ` jason at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2014-01-28 4:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58837
--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Tue Jan 28 04:30:26 2014
New Revision: 207162
URL: http://gcc.gnu.org/viewcvs?rev=207162&root=gcc&view=rev
Log:
PR c++/58837
* typeck.c (cp_truthvalue_conversion): Use explicit comparison for
FUNCTION_DECL.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/static_assert9.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/typeck.c
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/58837] [4.7/4.8/4.9 Regression] [c++11] ICE using invalid condition in static_assert
2013-10-22 3:56 [Bug c++/58837] New: [4.7/4.8/4.9 Regression] [c++11] ICE using invalid condition in static_assert reichelt at gcc dot gnu.org
` (3 preceding siblings ...)
2014-01-28 4:31 ` jason at gcc dot gnu.org
@ 2014-01-28 13:45 ` jason at gcc dot gnu.org
2014-01-28 13:53 ` jason at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2014-01-28 13:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58837
--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Tue Jan 28 13:44:35 2014
New Revision: 207185
URL: http://gcc.gnu.org/viewcvs?rev=207185&root=gcc&view=rev
Log:
PR c++/58837
* typeck.c (cp_truthvalue_conversion): Use explicit comparison for
FUNCTION_DECL.
Added:
branches/gcc-4_8-branch/gcc/testsuite/g++.dg/cpp0x/static_assert9.C
Modified:
branches/gcc-4_8-branch/gcc/cp/ChangeLog
branches/gcc-4_8-branch/gcc/cp/typeck.c
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/58837] [4.7/4.8/4.9 Regression] [c++11] ICE using invalid condition in static_assert
2013-10-22 3:56 [Bug c++/58837] New: [4.7/4.8/4.9 Regression] [c++11] ICE using invalid condition in static_assert reichelt at gcc dot gnu.org
` (4 preceding siblings ...)
2014-01-28 13:45 ` jason at gcc dot gnu.org
@ 2014-01-28 13:53 ` jason at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2014-01-28 13:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58837
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
Target Milestone|4.7.4 |4.8.3
--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for 4.8.3/4.9. Not fixing in 4.7.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-01-28 13:53 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-22 3:56 [Bug c++/58837] New: [4.7/4.8/4.9 Regression] [c++11] ICE using invalid condition in static_assert reichelt at gcc dot gnu.org
2013-10-23 8:06 ` [Bug c++/58837] " rguenth at gcc dot gnu.org
2013-11-19 10:24 ` rguenth at gcc dot gnu.org
2014-01-27 15:11 ` jason at gcc dot gnu.org
2014-01-28 4:31 ` jason at gcc dot gnu.org
2014-01-28 13:45 ` jason at gcc dot gnu.org
2014-01-28 13:53 ` 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).