summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr38140.c
blob: 35f6010089ef020aac0f3f5676ea8a506b8eac80 (plain)
1
2
3
4
5
6
7
8
9
10
/* PR middle-end/38140 */
/* { dg-do compile } */
/* { dg-options "-O2 -fno-strict-aliasing" } */

int foo (void *x)
{
  int (*fn) (int);
  *(void **)&fn = x;
  return fn (6);
}