public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "reichelt at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/58837] New: [4.7/4.8/4.9 Regression] [c++11] ICE using invalid condition in static_assert Date: Tue, 22 Oct 2013 03:56:00 -0000 [thread overview] Message-ID: <bug-58837-4@http.gcc.gnu.org/bugzilla/> (raw) 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.]
next reply other threads:[~2013-10-22 3:56 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-10-22 3:56 reichelt at gcc dot gnu.org [this message] 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-58837-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).