summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-60-csmith-9.c
blob: 64bd2711aadeead99e765d76161037f22e17e1c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* { dg-do run } */
/* { dg-options  "-w -flto -fipa-type-escape-analysis -fdump-ipa-type-escape-analysis " } */

#include <stdint.h>

void
foo (uint64_t a, uint64_t b)
{
  a + b;
}

struct a
{
  uint64_t b;
  uint8_t c
} d ()
{
  // I think the problem here is with the const attribute...
  const struct a e;
  foo (0, e.b);
  return e;
}

main () {}

/* { dg-final { scan-ipa-dump "a.c may be deleted" "type-escape-analysis" } } */