public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/61723] New: [C++11] ICE in contains_struct_check
@ 2014-07-05 18:58 ppluzhnikov at google dot com
  2014-07-15 14:09 ` [Bug c++/61723] " paolo.carlini at oracle dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: ppluzhnikov at google dot com @ 2014-07-05 18:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61723

            Bug ID: 61723
           Summary: [C++11] ICE in contains_struct_check
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ppluzhnikov at google dot com

Google ref: b/16030670.

AFAICT, this is broken in all of 4.7 / 4.8 / 4.9 / 4.10.
Accepted by Clang without warnings.

gcc-svn-r212277/bin/g++ -c -std=c++11 t.cc
t.cc: In function ‘void fn1()’:
t.cc:29:14: internal compiler error: Segmentation fault
     spec.dim = { };
              ^
0xb8527f crash_signal
    ../../gcc/toplev.c:337
0x557b81 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
    ../../gcc/tree.h:2844
0x557b81 convert_like_real
    ../../gcc/cp/call.c:6257
0x554eab build_over_call
    ../../gcc/cp/call.c:7162
0x55800b convert_like_real
    ../../gcc/cp/call.c:6160
0x55799b convert_like_real
    ../../gcc/cp/call.c:6290
0x554eab build_over_call
    ../../gcc/cp/call.c:7162
0x56785c build_new_op_1
    ../../gcc/cp/call.c:5513
0x567c4e build_new_op(unsigned int, tree_code, int, tree_node*, tree_node*,
tree_node*, tree_node**, int)
    ../../gcc/cp/call.c:5674
0x6a6aeb cp_build_modify_expr(tree_node*, tree_code, tree_node*, int)
    ../../gcc/cp/typeck.c:7399
0x669632 cp_parser_assignment_expression
    ../../gcc/cp/parser.c:8216
0x66b8a3 cp_parser_expression
    ../../gcc/cp/parser.c:8342
0x66c0cc cp_parser_expression
    ../../gcc/cp/parser.c:8381
0x66c0cc cp_parser_expression_statement
    ../../gcc/cp/parser.c:9720
0x660e98 cp_parser_statement
    ../../gcc/cp/parser.c:9571
0x661ca9 cp_parser_statement_seq_opt
    ../../gcc/cp/parser.c:9843
0x661e16 cp_parser_compound_statement
    ../../gcc/cp/parser.c:9797
0x67319b cp_parser_function_body
    ../../gcc/cp/parser.c:18872
0x67319b cp_parser_ctor_initializer_opt_and_function_body
    ../../gcc/cp/parser.c:18908
0x679883 cp_parser_function_definition_after_declarator
    ../../gcc/cp/parser.c:23044
Please submit a full bug report,
with preprocessed source if appropriate.


gcc-svn-r212277/bin/g++ -c -std=c++11 t.cc -DBUG1
t.cc: In function ‘void fn1()’:
t.cc:26:1: error: non-trivial conversion at assignment
 fn1 ()
 ^
int
const int[0:18446744073709551615] *
D.2173._M_len = &._0;
t.cc:26:1: internal compiler error: verify_gimple failed
0xbb49ff verify_gimple_in_seq(gimple_statement_base*)
    ../../gcc/tree-cfg.c:4665
0x9cb6c1 gimplify_body(tree_node*, bool)
    ../../gcc/gimplify.c:8848
0x9cba26 gimplify_function_tree(tree_node*)
    ../../gcc/gimplify.c:8933
0x84be17 analyze_function
    ../../gcc/cgraphunit.c:650
0x84d01f analyze_functions
    ../../gcc/cgraphunit.c:1028
0x84e8e5 finalize_compilation_unit()
    ../../gcc/cgraphunit.c:2331
0x63b07e cp_write_global_declarations()
    ../../gcc/cp/decl2.c:4652
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.


// -- cut ---
namespace std {
  template < class > struct initializer_list
  {
#if BUG1
    int _M_len;
#endif
    const int *begin ();
    const int *end ();
  };
}

struct J
{
    J (const int &);
    template < typename InputIterator > J (InputIterator, InputIterator);
    J (std::initializer_list < int >p1):J (p1.begin (), p1.end ()) { }
};

struct L
{
    L ():dim (0) { }
    J dim;
};

void
fn1 ()
{
    L spec;
    spec.dim = { };
}
// --- cut ---
>From gcc-bugs-return-455704-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Jul 05 19:33:38 2014
Return-Path: <gcc-bugs-return-455704-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 16705 invoked by alias); 5 Jul 2014 19:33:36 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 16620 invoked by uid 55); 5 Jul 2014 19:33:28 -0000
From: "tsaunders at mozilla dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug bootstrap/61679] build fails with G++ 4.5.1 - prototype for hash_table does not match any in class
Date: Sat, 05 Jul 2014 19:33:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: bootstrap
X-Bugzilla-Version: 4.10.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: tsaunders at mozilla dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-61679-4-J7Xf6YUB4Q@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-61679-4@http.gcc.gnu.org/bugzilla/>
References: <bug-61679-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-07/txt/msg00295.txt.bz2
Content-length: 1230

https://gcc.gnu.org/bugzilla/show_bug.cgi?ida679

--- Comment #1 from Trevor Saunders <tsaunders at mozilla dot com> ---
The following patch compiles with 4.9 for me, but I don't have easy
access to a machine with 4.5 on it, would you mind testing if it works
for you?

diff --git a/gcc/hash-table.h b/gcc/hash-table.h
index 22af12f..2356f8d 100644
--- a/gcc/hash-table.h
+++ b/gcc/hash-table.h
@@ -663,7 +663,7 @@ hash_table<Descriptor, Allocator, false>::~hash_table ()
    HASH is the hash value for the element to be inserted.  */

 template<typename Descriptor, template<typename Type> class Allocator>
-typename Descriptor::value_type **
+typename hash_table<Descriptor, Allocator, false>::value_type **
 hash_table<Descriptor, Allocator, false>
 ::find_empty_slot_for_expand (hashval_t hash)
 {
@@ -803,7 +803,7 @@ hash_table<Descriptor, Allocator, false>::clear_slot
(value_type **slot)
    be used to insert or delete an element. */

 template<typename Descriptor, template<typename Type> class Allocator>
-typename Descriptor::value_type *
+typename hash_table<Descriptor, Allocator, false>::value_type *
 hash_table<Descriptor, Allocator, false>
 ::find_with_hash (const compare_type *comparable, hashval_t hash)
 {


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-12-12 18:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-05 18:58 [Bug c++/61723] New: [C++11] ICE in contains_struct_check ppluzhnikov at google dot com
2014-07-15 14:09 ` [Bug c++/61723] " paolo.carlini at oracle dot com
2014-07-15 15:22 ` jason at gcc dot gnu.org
2014-07-15 19:17 ` jason at gcc dot gnu.org
2014-07-15 19:37 ` jason at gcc dot gnu.org
2014-07-15 20:51 ` ppluzhnikov at google dot com
2014-07-31 13:34 ` paolo.carlini at oracle dot com
2014-12-12 18:53 ` paolo.carlini at oracle dot com

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