[Bug target/77728] [5/6/7/8 Regression] Miscompilation multiple vector iteration on ARM

2017-04-25 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728 --- Comment #46 from Jakub Jelinek --- Author: jakub Date: Tue Apr 25 16:47:32 2017 New Revision: 247259 URL: https://gcc.gnu.org/viewcvs?rev=247259=gcc=rev Log: PR target/77728 * config/arm/arm.c: Include gimple.h.

[Bug target/77728] [5/6/7/8 Regression] Miscompilation multiple vector iteration on ARM

2017-04-25 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728 --- Comment #45 from Jakub Jelinek --- Author: jakub Date: Tue Apr 25 16:46:34 2017 New Revision: 247258 URL: https://gcc.gnu.org/viewcvs?rev=247258=gcc=rev Log: PR target/77728 * config/arm/arm.c: Include gimple.h.

[Bug target/77728] [5/6/7/8 Regression] Miscompilation multiple vector iteration on ARM

2017-04-25 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728 --- Comment #44 from Jakub Jelinek --- Works for me. That would mean roughly applying the two patches, but instead of doing else if (res < 0) do if (res) (and something similar for aarch64).

[Bug target/77728] [5/6/7/8 Regression] Miscompilation multiple vector iteration on ARM

2017-04-25 Thread rearnsha at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728 --- Comment #43 from Richard Earnshaw --- Hmm, so how about just inserting the warning in the broken compilers?

[Bug target/77728] [5/6/7/8 Regression] Miscompilation multiple vector iteration on ARM

2017-04-25 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728 --- Comment #42 from Jakub Jelinek --- Oh, and we surely need to document this in gcc-7/changes.html, and I'd think we should make sure to also document the earlier ARM ABI change in gcc-5/changes.html for GCC 5.2 when it has changed and

[Bug target/77728] [5/6/7/8 Regression] Miscompilation multiple vector iteration on ARM

2017-04-25 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728 --- Comment #41 from Jakub Jelinek --- That is true, but we've got only a single bugreport about this since the 5.2 release (21 months), so it doesn't trigger that often. For static data members the ABI is self-consistent, for some template

[Bug target/77728] [5/6/7/8 Regression] Miscompilation multiple vector iteration on ARM

2017-04-25 Thread rearnsha at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728 --- Comment #40 from Richard Earnshaw --- (In reply to Jakub Jelinek from comment #39) > It is an ABI change, so I think it is highly undesirable to backport. It is > enough that people will have to rebuild many packages built by GCC 7 >

[Bug target/77728] [5/6/7/8 Regression] Miscompilation multiple vector iteration on ARM

2017-04-25 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728 --- Comment #39 from Jakub Jelinek --- It is an ABI change, so I think it is highly undesirable to backport. It is enough that people will have to rebuild many packages built by GCC 7 prereleases, if it is backported, they would have to rebuild

[Bug target/77728] [5/6/7/8 Regression] Miscompilation multiple vector iteration on ARM

2017-04-25 Thread clyon at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728 Christophe Lyon changed: What|Removed |Added CC||clyon at gcc dot gnu.org --- Comment

[Bug target/77728] [5/6/7/8 Regression] Miscompilation multiple vector iteration on ARM

2017-04-25 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728 --- Comment #37 from Jakub Jelinek --- Author: jakub Date: Tue Apr 25 13:56:10 2017 New Revision: 247241 URL: https://gcc.gnu.org/viewcvs?rev=247241=gcc=rev Log: PR target/77728 * config/aarch64/aarch64.c (struct

[Bug target/77728] [5/6/7/8 Regression] Miscompilation multiple vector iteration on ARM

2017-04-25 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728 --- Comment #36 from Jakub Jelinek --- Author: jakub Date: Tue Apr 25 13:52:33 2017 New Revision: 247239 URL: https://gcc.gnu.org/viewcvs?rev=247239=gcc=rev Log: PR target/77728 * config/aarch64/aarch64.c (struct

[Bug target/77728] [5/6/7/8 Regression] Miscompilation multiple vector iteration on ARM

2017-04-25 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728 --- Comment #35 from Jakub Jelinek --- Created attachment 41264 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41264=edit gcc7-pr77728-aarch64.patch Similarly adjusted AArch64 patch. In the earlier AArch64 patch, warning_alignment didn't

[Bug target/77728] [5/6/7/8 Regression] Miscompilation multiple vector iteration on ARM

2017-04-25 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728 Jakub Jelinek changed: What|Removed |Added Attachment #41262|0 |1 is obsolete|

[Bug target/77728] [5/6/7/8 Regression] Miscompilation multiple vector iteration on ARM

2017-04-25 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728 Jakub Jelinek changed: What|Removed |Added Attachment #41261|0 |1 is obsolete|

[Bug target/77728] [5/6/7/8 Regression] Miscompilation multiple vector iteration on ARM

2017-04-25 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728 Jakub Jelinek changed: What|Removed |Added Attachment #41259|0 |1 is obsolete|

[Bug target/77728] [5/6/7/8 Regression] Miscompilation multiple vector iteration on ARM

2017-04-24 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728 --- Comment #31 from Jakub Jelinek --- (In reply to Jakub Jelinek from comment #30) > Created attachment 41259 [details] > gcc7-pr77728.patch The above attached version successfully bootstrapped with --enable-languages=c,c++

[Bug target/77728] [5/6/7/8 Regression] Miscompilation multiple vector iteration on ARM

2017-04-24 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728 --- Comment #30 from Jakub Jelinek --- Created attachment 41259 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41259=edit gcc7-pr77728.patch This is how I'd have written the aarch32 patch. It has smaller amount of changes and calls the

[Bug target/77728] [5/6/7/8 Regression] Miscompilation multiple vector iteration on ARM

2017-04-24 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728 --- Comment #29 from Jakub Jelinek --- Also, the aarch64_function_arg_alignment and arm_needs_doubleword_align function comments need updating.

[Bug target/77728] [5/6/7/8 Regression] Miscompilation multiple vector iteration on ARM

2017-04-24 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728 --- Comment #28 from Jakub Jelinek --- The + else + warn_align = MAX (warn_align, DECL_ALIGN (field)); last line here is misindented, should be below se.

[Bug target/77728] [5/6/7/8 Regression] Miscompilation multiple vector iteration on ARM

2017-04-24 Thread ramana at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728 --- Comment #27 from Ramana Radhakrishnan --- (In reply to Ramana Radhakrishnan from comment #26) > Created attachment 41257 [details] > AArch32 wip patch. > > I think there's one line > 80 chars here but this is what I'm testing > currently. >

[Bug target/77728] [5/6/7/8 Regression] Miscompilation multiple vector iteration on ARM

2017-04-24 Thread ramana at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728 Ramana Radhakrishnan changed: What|Removed |Added Attachment #41255|0 |1 is obsolete|

[Bug target/77728] [5/6/7/8 Regression] Miscompilation multiple vector iteration on ARM

2017-04-24 Thread ramana at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728 --- Comment #25 from Ramana Radhakrishnan --- Created attachment 41255 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41255=edit AArch32 wip patch. - There are some line > 80 characters, cosmetic issues in this patch . - However this

[Bug target/77728] [5/6/7/8 Regression] Miscompilation multiple vector iteration on ARM

2017-04-24 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728 --- Comment #24 from Jakub Jelinek --- std::min/max was used in the backend previously too, so it is your decision and doesn't need to be changed to resolve this regression. Do you have arm32 patch too, or would it be helpful if I write one

[Bug target/77728] [5/6/7/8 Regression] Miscompilation multiple vector iteration on ARM

2017-04-24 Thread ramana at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728 Ramana Radhakrishnan changed: What|Removed |Added Attachment #41237|0 |1 is obsolete|

[Bug target/77728] [5/6/7/8 Regression] Miscompilation multiple vector iteration on ARM

2017-04-21 Thread ramana at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728 --- Comment #22 from Ramana Radhakrishnan --- (In reply to Jakub Jelinek from comment #20) > BTW, the wording e.g. i386 backend has is: > inform (input_location, > "the ABI of passing structure with complex

[Bug target/77728] [5/6/7/8 Regression] Miscompilation multiple vector iteration on ARM

2017-04-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728 --- Comment #21 from Jakub Jelinek --- inform, beyond being consistent with what i386 and rs6000 backends do here, has the advantage that it doesn't break the build even with -Werror, generally there is nothing wrong on the code we want to

[Bug target/77728] [5/6/7/8 Regression] Miscompilation multiple vector iteration on ARM

2017-04-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728 --- Comment #20 from Jakub Jelinek --- BTW, the wording e.g. i386 backend has is: inform (input_location, "the ABI of passing structure with complex float" " member has changed in GCC

[Bug target/77728] [5/6/7/8 Regression] Miscompilation multiple vector iteration on ARM

2017-04-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728 --- Comment #19 from Jakub Jelinek --- Indeed, with the above plus: #include int fn1 (int a, int b, int c, int d, int e, int f, int g, int h, int i, int j, int k, int l, int m, B<0> n, ...) { va_list ap; va_start (ap, n); int x = va_arg

[Bug target/77728] [5/6/7/8 Regression] Miscompilation multiple vector iteration on ARM

2017-04-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728 --- Comment #18 from Jakub Jelinek --- If you want a testcase for aarch64, e.g. template struct alignas (16) A { char p[16]; }; A<0> v; template struct B { typedef A T; int i, j, k, l; }; int foo (int a, B<0> b) { return a + b.i; } int

[Bug target/77728] [5/6/7/8 Regression] Miscompilation multiple vector iteration on ARM

2017-04-20 Thread ramana at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728 --- Comment #17 from Ramana Radhakrishnan --- Created attachment 41237 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41237=edit AArch64 prototype. Patch.

[Bug target/77728] [5/6/7/8 Regression] Miscompilation multiple vector iteration on ARM

2017-04-20 Thread ramana at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728 --- Comment #16 from Ramana Radhakrishnan --- (In reply to Jakub Jelinek from comment #10) > aarch64_function_arg_alignment > has: > for (tree field = TYPE_FIELDS (type); field; field = DECL_CHAIN (field)) > alignment = std::max