view gcc/testsuite/gcc.dg/20030323-1.c @ 144:8f4e72ab4e11

fix segmentation fault caused by nothing next cur_op to end
author Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Sun, 23 Dec 2018 21:23:56 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* { dg-do run } */

/* PR c/8224 */
/* Contributed by Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz> */

extern void abort (void);

unsigned f (int x)
{
  return (unsigned) (x / 2) / 2;
}

unsigned f1 (int x)
{
  unsigned xx = x / 2;
  return xx / 2;
}

int main ()
{
  if (f1 (-5) != f (-5))
    abort ();
  return 0;
}