[Bug tree-optimization/78646] incorrect result type for pointer addition in slsr

2016-12-02 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78646 Richard Biener changed: What|Removed |Added CC||wschmidt at linux dot vnet.ibm.com ---

[Bug tree-optimization/78646] incorrect result type for pointer addition in slsr

2016-12-02 Thread stefan at reservoir dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78646 --- Comment #2 from Stefan M Freudenberger --- It's not an ICE on x86, but the dump shows the incorrect pointer type. Can I assert that the cand_type is a pointer and not a reference?

[Bug tree-optimization/78646] incorrect result type for pointer addition in slsr

2016-12-02 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78646 --- Comment #3 from Andrew Pinski --- A reference type is treated as a pointer type all the way through the middle end of gcc. Why is there an issue with that for your target?

[Bug tree-optimization/78646] incorrect result type for pointer addition in slsr

2016-12-02 Thread stefan at reservoir dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78646 --- Comment #4 from Stefan M Freudenberger --- I guess there wouldn't be an issue if it were a reference type. However, there is an issue with the incorrect alignment for the object type.

[Bug tree-optimization/78646] incorrect result type for pointer addition in slsr

2016-12-02 Thread stefan at reservoir dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78646 --- Comment #5 from Stefan M Freudenberger --- This is the revised patch: - add_expr = fold_build2 (POINTER_PLUS_EXPR, TREE_TYPE (c->base_expr), + add_expr = fold_build2 (POINTER_PLUS_EXPR, c->cand_type, c->base_expr,

[Bug tree-optimization/78646] incorrect result type for pointer addition in slsr

2016-12-02 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78646 Bill Schmidt changed: What|Removed |Added CC||wschmidt at gcc dot gnu.org --- Comment #

[Bug tree-optimization/78646] incorrect result type for pointer addition in slsr

2016-12-05 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78646 Bill Schmidt changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug tree-optimization/78646] incorrect result type for pointer addition in slsr

2016-12-05 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78646 --- Comment #8 from Bill Schmidt --- Author: wschmidt Date: Mon Dec 5 21:48:27 2016 New Revision: 243272 URL: https://gcc.gnu.org/viewcvs?rev=243272&root=gcc&view=rev Log: 2016-12-05 Bill Schmidt Stefan Freudenberger P

[Bug tree-optimization/78646] incorrect result type for pointer addition in slsr

2016-12-05 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78646 Bill Schmidt changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug tree-optimization/78646] incorrect result type for pointer addition in slsr

2016-12-06 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78646 --- Comment #10 from Bill Schmidt --- Author: wschmidt Date: Wed Dec 7 01:04:47 2016 New Revision: 243330 URL: https://gcc.gnu.org/viewcvs?rev=243330&root=gcc&view=rev Log: 2016-12-06 Bill Schmidt Backport from mainline 2016

[Bug tree-optimization/78646] incorrect result type for pointer addition in slsr

2016-12-06 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78646 --- Comment #11 from Bill Schmidt --- Author: wschmidt Date: Wed Dec 7 01:08:40 2016 New Revision: 243331 URL: https://gcc.gnu.org/viewcvs?rev=243331&root=gcc&view=rev Log: 2016-12-06 Bill Schmidt Backport from mainline 2016