view gcc/testsuite/gcc.dg/pr94436.c @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
line wrap: on
line source

/* PR middle-end/94436 */
/* { dg-do compile } */
/* { dg-options "-Wincompatible-pointer-types" } */

struct S { int s; };
int foo (struct S *);

int
bar (void)
{
  int s = 0;
  return foo ((struct S *) ((char *) &s - (char *) &((struct S *) 0)->s));	/* { dg-bogus "from incompatible pointer type" } */
}