[Bug middle-end/83487] [8 Regression] ICE in expand_call, at calls.c:4098

2017-12-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83487 Jakub Jelinek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug middle-end/83487] [8 Regression] ICE in expand_call, at calls.c:4098

2017-12-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83487 --- Comment #19 from Jakub Jelinek --- Author: jakub Date: Thu Dec 21 23:10:45 2017 New Revision: 255961 URL: https://gcc.gnu.org/viewcvs?rev=255961=gcc=rev Log: PR middle-end/83487 * config/i386/i386.c

[Bug middle-end/83487] [8 Regression] ICE in expand_call, at calls.c:4098

2017-12-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83487 --- Comment #18 from Jakub Jelinek --- I thought I've done it here by CCing relevant people. Or who else stands behind the x86-64 psABI these days? Anyway, I was looking at 0.95, seems newer psABI has more rules in there. Perhaps we can say

[Bug middle-end/83487] [8 Regression] ICE in expand_call, at calls.c:4098

2017-12-21 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83487 --- Comment #17 from H.J. Lu --- Please raise the issue at the psabi group.

[Bug middle-end/83487] [8 Regression] ICE in expand_call, at calls.c:4098

2017-12-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83487 --- Comment #16 from Jakub Jelinek --- My understanding is that GCC and G++ now handle those the same. But for the > 16 byte aggregates the psABI would need some rule, like say: If in C++ the object has a non-POD structure or union type, or

[Bug middle-end/83487] [8 Regression] ICE in expand_call, at calls.c:4098

2017-12-21 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83487 --- Comment #15 from H.J. Lu --- There were discussions in the x86-64 psabi group to make empty class passed the same way for C and C++. We were waiting for GCC to implement it before updating the psabi.

[Bug middle-end/83487] [8 Regression] ICE in expand_call, at calls.c:4098

2017-12-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83487 Jakub Jelinek changed: What|Removed |Added CC||hjl.tools at gmail dot com,

[Bug middle-end/83487] [8 Regression] ICE in expand_call, at calls.c:4098

2017-12-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83487 --- Comment #13 from Jakub Jelinek --- Perhaps: --- gcc/config/i386/i386.c.jj 2017-12-21 09:44:34.0 +0100 +++ gcc/config/i386/i386.c 2017-12-21 13:04:03.172252517 +0100 @@ -8973,6 +8973,8 @@ ix86_function_arg_boundary

[Bug middle-end/83487] [8 Regression] ICE in expand_call, at calls.c:4098

2017-12-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83487 --- Comment #12 from Jakub Jelinek --- Adjusted testcase, so that it is valid C and C++: struct __attribute__ ((aligned)) A {}; struct A a; void bar (int, int, int, int, int, int, int, struct A); void foo (void) { bar (6, 0, 1, 2, 3, 4, 5,

[Bug middle-end/83487] [8 Regression] ICE in expand_call, at calls.c:4098

2017-12-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83487 --- Comment #11 from Jakub Jelinek --- I certainly didn't mean this kind of change, after all, it will also break testing on what the alignof of the type is etc. What I meant is in calls.c, when considering alignment of arguments ignore it for

[Bug middle-end/83487] [8 Regression] ICE in expand_call, at calls.c:4098

2017-12-21 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83487 --- Comment #10 from Marek Polacek --- (But it doesn't work because it breaks the "canonical types differ for identical types %qT and %qT" test...)

[Bug middle-end/83487] [8 Regression] ICE in expand_call, at calls.c:4098

2017-12-20 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83487 --- Comment #9 from Marek Polacek --- Well, this seems to fix it. --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -1882,6 +1882,12 @@ finalize_type_size (tree type) /* Handle empty records as per the x86-64 psABI. */ TYPE_EMPTY_P

[Bug middle-end/83487] [8 Regression] ICE in expand_call, at calls.c:4098

2017-12-20 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83487 Marek Polacek changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned

[Bug middle-end/83487] [8 Regression] ICE in expand_call, at calls.c:4098

2017-12-20 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83487 --- Comment #8 from Marek Polacek --- Yeah, that sounds like a reasonable thing to do to me.

[Bug middle-end/83487] [8 Regression] ICE in expand_call, at calls.c:4098

2017-12-20 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83487 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #7

[Bug middle-end/83487] [8 Regression] ICE in expand_call, at calls.c:4098

2017-12-19 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83487 --- Comment #6 from Marek Polacek --- What sense does it make to align an empty struct anyway?

[Bug middle-end/83487] [8 Regression] ICE in expand_call, at calls.c:4098

2017-12-19 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83487 --- Comment #5 from Marek Polacek --- This actually reproduces with C and C++ ABI 12, too. The problem is this: 4096 /* Stack must be properly aligned now. */ 4097 gcc_assert (!pass 4098 || !(stack_pointer_delta %

[Bug middle-end/83487] [8 Regression] ICE in expand_call, at calls.c:4098

2017-12-19 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83487 --- Comment #4 from Marek Polacek --- Better testcase: struct __attribute__ ((aligned)) S { }; void bar (int, int, int, int, int, int, int, struct S); struct S s; void foo (void) { bar (6, 0, 1, 2, 3, 4, 5, s); }