mirror of git://gcc.gnu.org/git/gcc.git
re PR c++/3698 (improper handling of an extern declared inline function)
PR c++/3698 PR c++/86208 * cp-gimplify.c (cp_genericize_r): When using extern_decl_map, or in TREE_USED flag from stmt to h->to. * g++.dg/opt/pr3698.C: New test. From-SVN: r262678
This commit is contained in:
parent
6fb4417f5e
commit
9e51f66f9b
|
|
@ -1,3 +1,10 @@
|
||||||
|
2018-07-16 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR c++/3698
|
||||||
|
PR c++/86208
|
||||||
|
* cp-gimplify.c (cp_genericize_r): When using extern_decl_map, or
|
||||||
|
in TREE_USED flag from stmt to h->to.
|
||||||
|
|
||||||
2018-07-13 Nathan Sidwell <nathan@acm.org>
|
2018-07-13 Nathan Sidwell <nathan@acm.org>
|
||||||
|
|
||||||
PR c++/86374
|
PR c++/86374
|
||||||
|
|
|
||||||
|
|
@ -1085,6 +1085,7 @@ cp_genericize_r (tree *stmt_p, int *walk_subtrees, void *data)
|
||||||
if (h)
|
if (h)
|
||||||
{
|
{
|
||||||
*stmt_p = h->to;
|
*stmt_p = h->to;
|
||||||
|
TREE_USED (h->to) |= TREE_USED (stmt);
|
||||||
*walk_subtrees = 0;
|
*walk_subtrees = 0;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,9 @@
|
||||||
|
2018-07-16 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR c++/3698
|
||||||
|
PR c++/86208
|
||||||
|
* g++.dg/opt/pr3698.C: New test.
|
||||||
|
|
||||||
2018-07-16 Richard Biener <rguenther@suse.de>
|
2018-07-16 Richard Biener <rguenther@suse.de>
|
||||||
|
|
||||||
PR ipa/86389
|
PR ipa/86389
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
// PR c++/3698
|
||||||
|
// { dg-do link }
|
||||||
|
// { dg-options "-O0" }
|
||||||
|
|
||||||
|
struct X {
|
||||||
|
int i;
|
||||||
|
};
|
||||||
|
|
||||||
|
inline const int&
|
||||||
|
OHashKey (const X& x)
|
||||||
|
{
|
||||||
|
return x.i;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
extern const int& OHashKey (const X& x);
|
||||||
|
X x;
|
||||||
|
return OHashKey (x);
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue