alias.c (compare_base_decls): Use symtab_node::get.
gcc/ * alias.c (compare_base_decls): Use symtab_node::get. gcc/testsuite/ * gcc.dg/alias-15.c: New. From-SVN: r232073
This commit is contained in:
parent
a2faef8e06
commit
929710d96c
4 changed files with 32 additions and 2 deletions
|
@ -1,3 +1,7 @@
|
|||
2016-01-05 Nathan Sidwell <nathan@acm.org>
|
||||
|
||||
* alias.c (compare_base_decls): Use symtab_node::get.
|
||||
|
||||
2016-01-05 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR target/68770
|
||||
|
|
11
gcc/alias.c
11
gcc/alias.c
|
@ -2044,8 +2044,15 @@ compare_base_decls (tree base1, tree base2)
|
|||
|| !decl_in_symtab_p (base2))
|
||||
return 0;
|
||||
|
||||
ret = symtab_node::get_create (base1)->equal_address_to
|
||||
(symtab_node::get_create (base2), true);
|
||||
/* Don't cause symbols to be inserted by the act of checking. */
|
||||
symtab_node *node1 = symtab_node::get (base1);
|
||||
if (!node1)
|
||||
return 0;
|
||||
symtab_node *node2 = symtab_node::get (base2);
|
||||
if (!node2)
|
||||
return 0;
|
||||
|
||||
ret = node1->equal_address_to (node2, true);
|
||||
if (ret == 2)
|
||||
return -1;
|
||||
return ret;
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2016-01-05 Nathan Sidwell <nathan@acm.org>
|
||||
|
||||
* gcc.dg/alias-15.c: New.
|
||||
|
||||
2016-01-05 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR target/68870
|
||||
|
|
15
gcc/testsuite/gcc.dg/alias-15.c
Normal file
15
gcc/testsuite/gcc.dg/alias-15.c
Normal file
|
@ -0,0 +1,15 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-additional-options "-O2 -fdump-ipa-cgraph" } */
|
||||
|
||||
/* RTL-level CSE shouldn't introduce LCO (for the string) into varpool */
|
||||
char *p;
|
||||
|
||||
void foo ()
|
||||
{
|
||||
p = "abc\n";
|
||||
|
||||
while (*p != '\n')
|
||||
p++;
|
||||
}
|
||||
|
||||
/* { dg-final { scan-ipa-dump-not "LC0" "cgraph" } } */
|
Loading…
Add table
Reference in a new issue