view gcc/testsuite/gcc.c-torture/compile/pr17273.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

struct A { int i; };
struct B { struct A a; };

void f(struct A*, struct A*);
#define bool _Bool

void bar(bool b)
{
  struct B * D1601;
  struct A D1576;
  struct A * D1593;
  struct B * D1592;
  struct B D1575;

  D1575 = (struct B){};

  if (b) D1592 = &D1575; else D1592 = &D1575;

  D1593 = &D1592->a; // <-- we are prograting &D1575 into here.
  D1576 = (struct A){};
  f (D1593, &D1576);
}