Re: [PATCH] Fix PR ipa/65318

2015-03-06 Thread Jan Hubicka
> > Yes - but I said that having an alias should have the same effect as > the MEM_REF wrapping we do in LTO (to not barf on stmt verification > if symbol merging merges an int and a float for example). Yep, though alias is bit different from LTO - in LTO we replace the decl in place, while alia

Re: [PATCH] Fix PR ipa/65318

2015-03-06 Thread Richard Biener
On Thu, Mar 5, 2015 at 7:38 PM, Jan Hubicka wrote: >> >Index: gimple-fold.c >> >=== >> >--- gimple-fold.c(revision 221170) >> >+++ gimple-fold.c(working copy) >> >@@ -263,7 +263,16 @@ get_symbol_constant_value (tree sym) >> >

Re: [PATCH] Fix PR ipa/65318

2015-03-05 Thread Jan Hubicka
> >Index: gimple-fold.c > >=== > >--- gimple-fold.c(revision 221170) > >+++ gimple-fold.c(working copy) > >@@ -263,7 +263,16 @@ get_symbol_constant_value (tree sym) > > { > > val = canonicalize_constructor_val (unshar

Re: [PATCH] Fix PR ipa/65318

2015-03-05 Thread Richard Biener
On March 5, 2015 7:08:16 PM CET, Jan Hubicka wrote: >Hi, >this patch sovles the incorrect folding. The very same unification >(ignoring >signedness by checking that memory representation is the same) is done >by >constant pool. > >Some of the other uses of ctor_for_folding therefore already uses >

Re: [PATCH] Fix PR ipa/65318

2015-03-05 Thread Richard Biener
On March 5, 2015 7:08:16 PM CET, Jan Hubicka wrote: >Hi, >this patch sovles the incorrect folding. The very same unification >(ignoring >signedness by checking that memory representation is the same) is done >by >constant pool. > >Some of the other uses of ctor_for_folding therefore already uses >

Re: [PATCH] Fix PR ipa/65318

2015-03-05 Thread Jan Hubicka
Hi, this patch sovles the incorrect folding. The very same unification (ignoring signedness by checking that memory representation is the same) is done by constant pool. Some of the other uses of ctor_for_folding therefore already uses VIEW_CONVERT_EXPR, I suppose as a partial fix for past bugs. T

Re: [PATCH] Fix PR ipa/65318

2015-03-05 Thread Jan Hubicka
> > gcc/ChangeLog: > > > > 2015-03-05 Martin Liska > > > > PR ipa/65318 > > * ipa-icf.c (sem_variable::equals): Compare variables types. > > > > gcc/testsuite/ChangeLog: > > > > 2015-03-05 Martin Liska > > > > * gcc.dg/ipa/pr65318.c: New test. > > OK, Though actually I think

Re: [PATCH] Fix PR ipa/65318

2015-03-05 Thread Jan Hubicka
> gcc/ChangeLog: > > 2015-03-05 Martin Liska > > PR ipa/65318 > * ipa-icf.c (sem_variable::equals): Compare variables types. > > gcc/testsuite/ChangeLog: > > 2015-03-05 Martin Liska > > * gcc.dg/ipa/pr65318.c: New test. OK, Honza

Re: [PATCH] Fix PR ipa/65318

2015-03-05 Thread Jeff Law
On 03/05/15 07:37, Martin Liška wrote: From 3f35d9ec57880409cde384bb7b9e8dbaae5231ef Mon Sep 17 00:00:00 2001 From: mliska Date: Thu, 5 Mar 2015 13:41:07 +0100 Subject: [PATCH] Fix PR ipa/65318. gcc/ChangeLog: 2015-03-05 Martin Liska PR ipa/65318 * ipa-icf.c (sem_variable

Re: [PATCH] Fix PR ipa/65318

2015-03-05 Thread Martin Liška
ixed in updated version of patch. Thanks, Martin >From 3f35d9ec57880409cde384bb7b9e8dbaae5231ef Mon Sep 17 00:00:00 2001 From: mliska Date: Thu, 5 Mar 2015 13:41:07 +0100 Subject: [PATCH] Fix PR ipa/65318. gcc/ChangeLog: 2015-03-05 Martin Liska PR ipa/65318 * ipa-icf.c (sem_variable::equals): C

Re: [PATCH] Fix PR ipa/65318

2015-03-05 Thread Marek Polacek
On Thu, Mar 05, 2015 at 02:53:44PM +0100, Martin Liška wrote: > --- a/gcc/ipa-icf.c > +++ b/gcc/ipa-icf.c > @@ -1501,6 +1501,11 @@ sem_variable::equals (sem_item *item, >if (DECL_INITIAL (item->decl) == error_mark_node && in_lto_p) > dyn_cast (item->node)->get_constructor (); > > + /* A

[PATCH] Fix PR ipa/65318

2015-03-05 Thread Martin Liška
13:41:07 +0100 Subject: [PATCH] Fix PR ipa/65318. gcc/ChangeLog: 2015-03-05 Martin Liska PR ipa/65318 * ipa-icf.c (sem_variable::equals): Compare variable types. gcc/testsuite/ChangeLog: 2015-03-05 Martin Liska * gcc.dg/ipa/PR65318.c: New test. --- gcc/ipa-icf.c |