Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/torture/pr55253.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* { dg-do run } */ struct { int mallocFailed; } *a; struct StrAccum { int useMalloc; } b, c; static void fn1 (struct StrAccum *p1, int p2) { if (p2 == 0) return; if (p1->useMalloc) a->mallocFailed = 0; } void fn2 (struct StrAccum *p1) { fn1 (p1, 1); } void fn3 (struct StrAccum *p1) { fn1 (p1, 1); } void fn4 () { c.useMalloc = 1; fn1 (&c, 0); } int main () { fn3 (&b); return 0; }