[Bug target/60516] [4.7/4.8/4.9 regression]: cc1plus crashes compiling a method with a huge struct as argument

2014-03-17 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60516

--- Comment #10 from Jakub Jelinek  ---
Author: jakub
Date: Mon Mar 17 19:03:04 2014
New Revision: 208623

URL: http://gcc.gnu.org/viewcvs?rev=208623&root=gcc&view=rev
Log:
PR target/60516
* config/i386/i386.c (ix86_expand_epilogue): Adjust REG_CFA_ADJUST_CFA
note creation for the 2010-08-31 changes.

* gcc.target/i386/pr60516.c: New test.

Added:
trunk/gcc/testsuite/gcc.target/i386/pr60516.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.c
trunk/gcc/testsuite/ChangeLog


[Bug target/60516] [4.7/4.8/4.9 regression]: cc1plus crashes compiling a method with a huge struct as argument

2014-03-17 Thread ktietz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60516

--- Comment #9 from Kai Tietz  ---
Did regression-test for 32-bit mingw for C, C++, and Fortran.  No new
regressions occurred.
So patch is from my POV ok for trunk and branches


[Bug target/60516] [4.7/4.8/4.9 regression]: cc1plus crashes compiling a method with a huge struct as argument

2014-03-17 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60516

Jakub Jelinek  changed:

   What|Removed |Added

  Attachment #32367|0   |1
is obsolete||

--- Comment #8 from Jakub Jelinek  ---
Created attachment 32368
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32368&action=edit
gcc49-pr60516.patch

Ok, testcase adjusted.


[Bug target/60516] [4.7/4.8/4.9 regression]: cc1plus crashes compiling a method with a huge struct as argument

2014-03-17 Thread ktietz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60516

--- Comment #7 from Kai Tietz  ---
Thanks for the patch.  I am about to do a full-regression test for it.  This
will take some time.
Quick test has shown that issue isn't 'thiscall' specific at all.  stdcall, and
fastcall calling-convention do have the same issues. So I would suggest to add
these two testcases to the patch, too.

/* PR target/60516 */
/* { dg-do compile } */
/* { dg-options "-O2" } */
struct S { char c[65536]; };

__attribute__((ms_abi, thiscall)) void
foo (void *x, struct S y)
{
}



/* PR target/60516 */
/* { dg-do compile } */
/* { dg-options "-O2" } */
struct S { char c[65536]; };

__attribute__((ms_abi, fastcall)) void
foo (void *x, void *xx, struct S y)
{
}


[Bug target/60516] [4.7/4.8/4.9 regression]: cc1plus crashes compiling a method with a huge struct as argument

2014-03-16 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60516

--- Comment #6 from Jakub Jelinek  ---
Created attachment 32367
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32367&action=edit
gcc49-pr60516.patch

Untested fix.


[Bug target/60516] [4.7/4.8/4.9 regression]: cc1plus crashes compiling a method with a huge struct as argument

2014-03-16 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60516

Jakub Jelinek  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||jakub at gcc dot gnu.org
  Component|c++ |target
   Target Milestone|--- |4.7.4
Summary|[4.9/4.8 regression]:   |[4.7/4.8/4.9 regression]:
   |cc1plus crashes compiling a |cc1plus crashes compiling a
   |method with a huge struct   |method with a huge struct
   |as argument |as argument

--- Comment #5 from Jakub Jelinek  ---
(In reply to Kai Tietz from comment #3)
> Issue is that copy_rtx gets feed with invalid insn.

No, it is fed completely valid insn, but just the note creation hasn't been
adjusted for the r163679 change.

(In reply to Mikael Pettersson from comment #4)
> Started with r171890.

With an improved C testcase actually with r163679.

struct S { char c[65536]; };

__attribute__((ms_abi, thiscall)) void
foo (void *x, struct S y)
{
}