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

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).