aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr80612.c
blob: d3f82d306b704d5776e2e121a6e4461554a80d23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* PR tree-optimization/80612 */
/* { dg-do compile } */
/* { dg-additional-options "-std=gnu17" } */

struct obstack *a;
struct obstack {
  union {
    void *plain;
    void (*extra)();
  } chunkfun;
} fn1(void p4()) {
  a->chunkfun.plain = p4;
  a->chunkfun.extra(a);
}
void fn2(int) __attribute__((__alloc_size__(1)));
void fn3() { fn1(fn2); }

/* { dg-prune-output "attribute ignored" } */