mirror of git://gcc.gnu.org/git/gcc.git
re PR ipa/65318 (wrong code at -Os and above on x86_64-linux-gnu)
PR ipa/65318 * ipa-icf.c (sem_variable::equals): Compare variables types. * gcc.dg/ipa/pr65318.c: New test. From-SVN: r221221
This commit is contained in:
parent
2755b64ed5
commit
9374ef820b
|
|
@ -1,3 +1,8 @@
|
||||||
|
2015-03-05 Martin Liska <mliska@suse.cz>
|
||||||
|
|
||||||
|
PR ipa/65318
|
||||||
|
* ipa-icf.c (sem_variable::equals): Compare variables types.
|
||||||
|
|
||||||
2015-03-05 Alex Velenko <alex.velenko@arm.com>
|
2015-03-05 Alex Velenko <alex.velenko@arm.com>
|
||||||
|
|
||||||
* config/arm/arm.c (arm_function_in_section_p): Fix predicate to
|
* config/arm/arm.c (arm_function_in_section_p): Fix predicate to
|
||||||
|
|
|
||||||
|
|
@ -1501,6 +1501,11 @@ sem_variable::equals (sem_item *item,
|
||||||
if (DECL_INITIAL (item->decl) == error_mark_node && in_lto_p)
|
if (DECL_INITIAL (item->decl) == error_mark_node && in_lto_p)
|
||||||
dyn_cast <varpool_node *>(item->node)->get_constructor ();
|
dyn_cast <varpool_node *>(item->node)->get_constructor ();
|
||||||
|
|
||||||
|
/* As seen in PR ipa/65303 we have to compare variables types. */
|
||||||
|
if (!func_checker::compatible_types_p (TREE_TYPE (decl),
|
||||||
|
TREE_TYPE (item->decl)))
|
||||||
|
return return_false_with_msg ("variables types are different");
|
||||||
|
|
||||||
ret = sem_variable::equals (DECL_INITIAL (decl),
|
ret = sem_variable::equals (DECL_INITIAL (decl),
|
||||||
DECL_INITIAL (item->node->decl));
|
DECL_INITIAL (item->node->decl));
|
||||||
if (dump_file && (dump_flags & TDF_DETAILS))
|
if (dump_file && (dump_flags & TDF_DETAILS))
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
2015-03-05 Martin Liska <mliska@suse.cz>
|
||||||
|
|
||||||
|
PR ipa/65318
|
||||||
|
* gcc.dg/ipa/pr65318.c: New test.
|
||||||
|
|
||||||
2015-03-05 Marek Polacek <polacek@redhat.com>
|
2015-03-05 Marek Polacek <polacek@redhat.com>
|
||||||
|
|
||||||
* c-c++-common/ubsan/bounds-6.c: Use dg-do run.
|
* c-c++-common/ubsan/bounds-6.c: Use dg-do run.
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
/* { dg-do compile } */
|
||||||
|
/* { dg-options "-O2 -fdump-ipa-icf-details" } */
|
||||||
|
|
||||||
|
static short a = 0;
|
||||||
|
short b = -1;
|
||||||
|
static unsigned short c = 0;
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
if (a <= b)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* { dg-final { scan-ipa-dump "Equal symbols: 0" "icf" } } */
|
||||||
|
/* { dg-final { cleanup-ipa-dump "icf" } } */
|
||||||
Loading…
Reference in New Issue