[Bug middle-end/56988] ipa-cp incorrectly propagates a field of an aggregate

2013-04-18 Thread rguenth at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56988



Richard Biener  changed:



   What|Removed |Added



   Keywords||wrong-code

 CC||jamborm at gcc dot gnu.org



--- Comment #1 from Richard Biener  2013-04-18 
08:09:09 UTC ---

I think that IPA-CP fails to see that the PARAM in the callee is addressable

and thus the load loads the _parameter_ and not indirectly _from_ the

parameter.

No?  So checking types looks wrong, checking whether a load is actually

just loading the pointer parameter itself is appropriate (possibly just

not handling address-taken parameters in callees).


[Bug middle-end/56988] ipa-cp incorrectly propagates a field of an aggregate

2013-04-18 Thread jamborm at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56988



Martin Jambor  changed:



   What|Removed |Added



 Status|UNCONFIRMED |ASSIGNED

   Last reconfirmed||2013-04-18

 AssignedTo|unassigned at gcc dot   |jamborm at gcc dot gnu.org

   |gnu.org |

 Ever Confirmed|0   |1



--- Comment #2 from Martin Jambor  2013-04-18 
11:45:09 UTC ---

Hm, let me have a look.


[Bug middle-end/56988] ipa-cp incorrectly propagates a field of an aggregate

2013-04-19 Thread jamborm at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56988



Martin Jambor  changed:



   What|Removed |Added



URL||http://gcc.gnu.org/ml/gcc-p

   ||atches/2013-04/msg01120.htm

   ||l



--- Comment #3 from Martin Jambor  2013-04-19 
09:09:26 UTC ---

Richi was right.  The proper fix is to not ignore by_ref.

I have already posted a patch to the mailing list:



http://gcc.gnu.org/ml/gcc-patches/2013-04/msg01120.html


[Bug middle-end/56988] ipa-cp incorrectly propagates a field of an aggregate

2013-04-23 Thread jamborm at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56988



Martin Jambor  changed:



   What|Removed |Added



  Known to work||4.7.3

  Known to fail||4.8.0, 4.9.0



--- Comment #4 from Martin Jambor  2013-04-23 
10:05:00 UTC ---

The 4.8 patch is the same except the ipa_get_indirect_edge_target_1

hunk because that code is not present on the branch.


[Bug middle-end/56988] ipa-cp incorrectly propagates a field of an aggregate

2013-05-02 Thread jamborm at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56988



--- Comment #5 from Martin Jambor  2013-05-02 
14:05:35 UTC ---

Patch committed to trunk.  I will commit the 4.8 version early next week.



Author: jamborm

Date: Thu May  2 14:03:02 2013

New Revision: 198540



URL: http://gcc.gnu.org/viewcvs?rev=198540&root=gcc&view=rev

Log:

2013-05-02  Martin Jambor  



PR middle-end/56988

* ipa-prop.h (ipa_agg_replacement_value): New flag by_ref.

* ipa-cp.c (ipa_get_indirect_edge_target_1): Also check that by_ref

flags match.

(find_aggregate_values_for_callers_subset): Fill in the by_ref flag of

ipa_agg_replacement_value structures.

(known_aggs_to_agg_replacement_list): Likewise.

* ipa-prop.c (write_agg_replacement_chain): Stream by_ref flag.

(read_agg_replacement_chain): Likewise.

(ipcp_transform_function): Also check that by_ref flags match.



testsuite/

* gcc.dg/ipa/pr56988.c: New test.





Added:

trunk/gcc/testsuite/gcc.dg/ipa/pr56988.c

Modified:

trunk/gcc/ChangeLog

trunk/gcc/ipa-cp.c

trunk/gcc/ipa-prop.c

trunk/gcc/ipa-prop.h

trunk/gcc/testsuite/ChangeLog


[Bug middle-end/56988] ipa-cp incorrectly propagates a field of an aggregate

2013-05-09 Thread jamborm at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56988

Martin Jambor  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Martin Jambor  ---
Fixed also on the branch with:

Author: jamborm
Date: Thu May  9 11:56:32 2013
New Revision: 198737

URL: http://gcc.gnu.org/viewcvs?rev=198737&root=gcc&view=rev
Log:
2013-05-09  Martin Jambor  

PR middle-end/56988
* ipa-prop.h (ipa_agg_replacement_value): New flag by_ref.
* ipa-cp.c (find_aggregate_values_for_callers_subset): Fill in the
by_ref flag of ipa_agg_replacement_value structures.
(known_aggs_to_agg_replacement_list): Likewise.
* ipa-prop.c (write_agg_replacement_chain): Stream by_ref flag.
(read_agg_replacement_chain): Likewise.
(ipcp_transform_function): Also check that by_ref flags match.

testsuite/
* gcc.dg/ipa/pr56988.c: New test.


Added:
branches/gcc-4_8-branch/gcc/testsuite/gcc.dg/ipa/pr56988.c
Modified:
branches/gcc-4_8-branch/gcc/ChangeLog
branches/gcc-4_8-branch/gcc/ipa-cp.c
branches/gcc-4_8-branch/gcc/ipa-prop.c
branches/gcc-4_8-branch/gcc/ipa-prop.h
branches/gcc-4_8-branch/gcc/testsuite/ChangeLog


[Bug middle-end/56988] ipa-cp incorrectly propagates a field of an aggregate

2013-05-21 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56988

Jakub Jelinek  changed:

   What|Removed |Added

 CC||dhazeghi at yahoo dot com

--- Comment #7 from Jakub Jelinek  ---
*** Bug 57321 has been marked as a duplicate of this bug. ***