view gcc/testsuite/gcc.dg/pr18241-4.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 } */
/* { dg-options "-O1" } */ 

void abort (void);

int f(int i1243)
{
  int i[2], *i1 = i;
  i[0] = 1;
  volatile int *i2 = i1;
  i2[1] = 1;
  i1243 = 0;
  return i2[1]+i2[0];
}


int main(void)
{
  if( f(100) != 2)
   abort ();
  return 0;
}