Commit e899d4b7 by Jakub Jelinek

Add testcase for already fixed PR [PR94436]

2020-04-01  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/94436
	* gcc.dg/pr94436.c: New test.
parent 0c9a8a8c
2020-04-01 Jakub Jelinek <jakub@redhat.com> 2020-04-01 Jakub Jelinek <jakub@redhat.com>
PR middle-end/94436
* gcc.dg/pr94436.c: New test.
PR middle-end/94423 PR middle-end/94423
* gcc.dg/ubsan/pr94423.c: New test. * gcc.dg/ubsan/pr94423.c: New test.
......
/* 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" } */
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment