https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80216

            Bug ID: 80216
           Summary: [7 Regression] Memory hog w/ -O1
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Keywords: memory-hog
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

At least gcc-7.0.0-alpha20170319 and gcc-7.0.0-alpha20170326 snapshots allocate
all available memory when compiling the following snippet w/ -O1:

int u4, lx, e0, zy, pz;

void
tb (int m6)
{
  for (pz = 0; pz < 1; ++pz)
    {
      for (zy = 0; zy < 1; ++zy)
        for (u4 = 0; u4 < 1; ++u4)
          for (e0 = 0; e0 < 1; ++e0)
            {
 as:
              for (;;)
                {
                }
            }

      if (e0 != 0)
        goto ql;

      if (0)
        {
 o3:
          for (lx = 0; lx < 1; ++lx)
            {
              m6 |= lx;
              if (m6 == 0)
                lx = 0;
 ql:
              ;
            }
          goto as;
        }
    }
  goto o3;
}

% timeout 20 gcc-7.0.0-alpha20170326 -O1 -c bxvehker.c 
zsh: exit 124   timeout 20 gcc-7.0.0-alpha20170326 -O1 -c bxvehker.c

Reply via email to