view gcc/testsuite/g++.dg/torture/pr60131.C @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 04ced10e8804
children
line wrap: on
line source

// { dg-do compile }
struct A { short a; };
int **b;
unsigned long c;

bool foo ();
unsigned bar (unsigned i);
extern void baz () __attribute__((noreturn));

int *
test (unsigned x, struct A *y)
{
  unsigned v;
  if (foo () || y[x].a == -1)
    {
      c = bar (x);
      return 0;
    }
  v = y[x].a;
  if (v >= 23)
    baz ();
  return b[v];
}