[Bug middle-end/89972] [8/9 Regression] ICE in expand_call, at calls.c:4229

2019-04-09 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89972

Marek Polacek  changed:

   What|Removed |Added

 Status|NEW |WAITING

--- Comment #7 from Marek Polacek  ---
I suppose we need to find out the answer first -> WAITING.

[Bug middle-end/89972] [8/9 Regression] ICE in expand_call, at calls.c:4229

2019-04-09 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89972

--- Comment #6 from Marek Polacek  ---
That'd be much appreciated, I was puzzled as to what we should do when I first
took a look at this.

[Bug middle-end/89972] [8/9 Regression] ICE in expand_call, at calls.c:4229

2019-04-09 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89972

--- Comment #5 from Jakub Jelinek  ---
(In reply to H.J. Lu from comment #4)
> > So, do we want to ignore the TYPE_EMPTY_P arguments even for argument
> > alignment computations (both at the caller and callee)?
> 
> We should ask it in x86-64 psABI group.

Can you please do that?
Thanks.

[Bug middle-end/89972] [8/9 Regression] ICE in expand_call, at calls.c:4229

2019-04-09 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89972

--- Comment #4 from H.J. Lu  ---
(In reply to Jakub Jelinek from comment #3)
> Looking at
> struct S { long a[0] __attribute__ ((aligned (32))); };
> long double u;
> void baz (struct S *);
> void bar (long double x, struct S y, long double z)
> {
>   u = x + z;
>   baz ();
> }
> this doesn't ICE, but gcc emits loads from rsp+32 and rsp+64, while clang
> from rbp+16 and rbp+32.
> So, do we want to ignore the TYPE_EMPTY_P arguments even for argument
> alignment computations (both at the caller and callee)?

We should ask it in x86-64 psABI group.

> Do we want some -Wpsabi warning for this?

I think so.

[Bug middle-end/89972] [8/9 Regression] ICE in expand_call, at calls.c:4229

2019-04-09 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89972

--- Comment #3 from Jakub Jelinek  ---
Looking at
struct S { long a[0] __attribute__ ((aligned (32))); };
long double u;
void baz (struct S *);
void bar (long double x, struct S y, long double z)
{
  u = x + z;
  baz ();
}
this doesn't ICE, but gcc emits loads from rsp+32 and rsp+64, while clang from
rbp+16 and rbp+32.
So, do we want to ignore the TYPE_EMPTY_P arguments even for argument alignment
computations (both at the caller and callee)?
Do we want some -Wpsabi warning for this?

[Bug middle-end/89972] [8/9 Regression] ICE in expand_call, at calls.c:4229

2019-04-09 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89972

Jakub Jelinek  changed:

   What|Removed |Added

   Keywords||ABI
 CC||andi-gcc at firstfloor dot org,
   ||hjl.tools at gmail dot com,
   ||hubicka at gcc dot gnu.org,
   ||jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek  ---
Guess this is primarily an ABI issue, whether such arguments shouldn't be
passed at all even if they have the extra alignments or not.
On:
struct S { long a[0] __attribute__ ((aligned (32))); };
void bar (long double, struct S, long double);
void foo (void)
{
  struct S b;
  bar (8.0L, b, 9.0L);
}
clang doesn't agree with icc, clang passes 8.0L at rsp and 9.0 at rsp+16, while
icc at rsp and rsp+32 (and gcc ICEs).

[Bug middle-end/89972] [8/9 Regression] ICE in expand_call, at calls.c:4229

2019-04-05 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89972

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2
  Component|c   |middle-end