re PR middle-end/53161 (ICE with weakref function and a function which takes vector types)
PR middle-end/53161 * symtab.c (symtab_register_node): Fix ordering issue. From-SVN: r187798
This commit is contained in:
parent
b8ce6b9cc0
commit
66379195d6
4 changed files with 36 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2012-05-22 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
PR middle-end/53161
|
||||
* symtab.c (symtab_register_node): Fix ordering issue.
|
||||
|
||||
2012-05-22 Steven Drake <sbd@NetBSD.org>
|
||||
|
||||
* gcc.c (do_spec_1): Add %M spec token to output multilib_os_dir.
|
||||
|
|
|
@ -177,11 +177,13 @@ symtab_register_node (symtab_node node)
|
|||
if (*slot == NULL)
|
||||
*slot = node;
|
||||
|
||||
insert_to_assembler_name_hash (node);
|
||||
ipa_empty_ref_list (&node->symbol.ref_list);
|
||||
|
||||
node->symbol.order = symtab_order++;
|
||||
|
||||
ipa_empty_ref_list (&node->symbol.ref_list);
|
||||
/* Be sure to do this last; C++ FE might create new nodes via
|
||||
DECL_ASSEMBLER_NAME langhook! */
|
||||
insert_to_assembler_name_hash (node);
|
||||
}
|
||||
|
||||
/* Make NODE to be the one symtab hash is pointing to. Used when reshaping tree
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2012-05-22 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
PR middle-end/53161
|
||||
* g++.dg/torture/pr53161.C: New testcase.
|
||||
|
||||
2012-05-22 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
PR fortran/53389
|
||||
|
|
22
gcc/testsuite/g++.dg/torture/pr53161.C
Normal file
22
gcc/testsuite/g++.dg/torture/pr53161.C
Normal file
|
@ -0,0 +1,22 @@
|
|||
/* { dg-options "-std=c++11" } */
|
||||
void gg();
|
||||
static __typeof(gg) __gthrw_gg __attribute__((__weakref__("gg")));
|
||||
|
||||
template<typename R,typename... A>
|
||||
struct data {
|
||||
template<typename Y,typename X>
|
||||
data(Y& y,R(X::*f)(A...));
|
||||
};
|
||||
|
||||
template<typename Y,typename X,typename R,typename... A>
|
||||
data<R,A...> make_data(Y& y,R(X::*f)(A...)) {
|
||||
return data<R,A...>(y,f);
|
||||
}
|
||||
|
||||
void global(data<void>);
|
||||
|
||||
struct test {
|
||||
void bar() {}
|
||||
void doit() { global(make_data(*this,&test::bar)); }
|
||||
};
|
||||
|
Loading…
Add table
Reference in a new issue