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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[12/13/14/15 Regression]    |[12/13/14/15 Regression]
                   |ICE on x86_64-linux-gnu: in |ICE on x86_64-linux-gnu: in
                   |verify_loop_structure, at   |verify_loop_structure, at
                   |cfgloop.cc:1742 at -Os and  |cfgloop.cc:1742 at -Os and
                   |above and returns twice     |above and returns twice
                   |                            |since r12-5301
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |rguenth at gcc dot gnu.org
           Priority|P3                          |P2

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Slightly cleaned up testcase (the const attribute still seems really weird,
only if say one expects to call the function only with 0 argument and foo has
no side-effects except that it isn't marked so).

int a, b;
void foo (void);
int __attribute__((returns_twice)) bar (int);

int __attribute__((const))
baz (int f)
{
  if (f)
    {
      l:;
      for (f = 0; f < 6; ++f)
        if (bar (b))
          goto l;
      for (;; a--)
        ;
    }
  foo ();
  return 0;
}

And indeed, started to ICE with
r12-5301-g045206450386bcd774db3bde0c696828402361c6

Reply via email to