[Bug c/85704] [8/9 Regression] cc1 run out of memory when it compile

2018-08-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85704

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #11 from Jakub Jelinek  ---
Fixed.

[Bug c/85704] [8/9 Regression] cc1 run out of memory when it compile

2018-08-01 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85704

--- Comment #10 from Jakub Jelinek  ---
Author: jakub
Date: Wed Aug  1 09:35:34 2018
New Revision: 263199

URL: https://gcc.gnu.org/viewcvs?rev=263199&root=gcc&view=rev
Log:
PR c/85704
* c-typeck.c (init_field_decl_cmp): New function.
(output_pending_init_elements): Use it for field comparisons
instead of pure bit_position comparisons.

* gcc.c-torture/compile/pr85704.c: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/gcc.c-torture/compile/pr85704.c
Modified:
branches/gcc-8-branch/gcc/c/ChangeLog
branches/gcc-8-branch/gcc/c/c-typeck.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug c/85704] [8/9 Regression] cc1 run out of memory when it compile

2018-08-01 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85704

--- Comment #9 from Jakub Jelinek  ---
Author: jakub
Date: Wed Aug  1 09:10:31 2018
New Revision: 263198

URL: https://gcc.gnu.org/viewcvs?rev=263198&root=gcc&view=rev
Log:
PR c/85704
* c-typeck.c (init_field_decl_cmp): New function.
(output_pending_init_elements): Use it for field comparisons
instead of pure bit_position comparisons.

* gcc.c-torture/compile/pr85704.c: New test.

Added:
trunk/gcc/testsuite/gcc.c-torture/compile/pr85704.c
Modified:
trunk/gcc/c/ChangeLog
trunk/gcc/c/c-typeck.c
trunk/gcc/testsuite/ChangeLog

[Bug c/85704] [8/9 Regression] cc1 run out of memory when it compile

2018-07-26 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85704

Jakub Jelinek  changed:

   What|Removed |Added

   Target Milestone|8.2 |8.3

--- Comment #8 from Jakub Jelinek  ---
GCC 8.2 has been released.

[Bug c/85704] [8/9 Regression] cc1 run out of memory when it compile

2018-07-23 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85704

Jakub Jelinek  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |jakub at gcc dot gnu.org

--- Comment #7 from Jakub Jelinek  ---
Created attachment 44425
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44425&action=edit
gcc9-pr85704.patch

Untested fix.  If people use thousands of consecutive zero sized fields in
structures, this could be compile time problematic, but we unfortunately don't
have any sort of monotonically increasing ids for FIELD_DECLs within the same
structure.

[Bug c/85704] [8/9 Regression] cc1 run out of memory when it compile

2018-07-23 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85704

Jakub Jelinek  changed:

   What|Removed |Added

   Keywords|needs-bisection,|
   |needs-reduction |
 CC||dave.pagan at oracle dot com,
   ||jsm28 at gcc dot gnu.org

--- Comment #6 from Jakub Jelinek  ---
Reduced testcase for -Os:

struct C { struct {} c; };
struct D { int d; struct C e; int f; };

void
foo (struct D *x)
{
  *x = (struct D) { .e = (struct C) { .c = {} } };
}

[Bug c/85704] [8/9 Regression] cc1 run out of memory when it compile

2018-07-23 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85704

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #5 from Jakub Jelinek  ---
Started with r258497 aka PR46921 fix.

[Bug c/85704] [8/9 Regression] cc1 run out of memory when it compile

2018-05-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85704

Richard Biener  changed:

   What|Removed |Added

 Target||x86_64-*-*
   Priority|P3  |P2
 Status|UNCONFIRMED |NEW
  Known to work||7.3.0
   Keywords||needs-bisection,
   ||needs-reduction
   Last reconfirmed|2018-05-08 00:00:00 |2018-05-09
  Component|middle-end  |c
 Ever confirmed|0   |1
Summary|cc1 run out of memory when  |[8/9 Regression] cc1 run
   |it compile  |out of memory when it
   ||compile
   Target Milestone|--- |8.2
  Known to fail||8.1.0

--- Comment #4 from Richard Biener  ---
Confirmed with just -Os.  We're stuck in parsing.

Run till exit from #0  0x00874c8c in output_pending_init_elements (
all=1, braced_init_obstack=0x7fffc000)
at /space/rguenther/src/svn/gcc-8-branch/gcc/c/c-typeck.c:9392
...