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.
This commit is contained in:
parent
0c9a8a8c10
commit
e899d4b712
@ -1,5 +1,8 @@
|
||||
2020-04-01 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/94436
|
||||
* gcc.dg/pr94436.c: New test.
|
||||
|
||||
PR middle-end/94423
|
||||
* gcc.dg/ubsan/pr94423.c: New test.
|
||||
|
||||
|
13
gcc/testsuite/gcc.dg/pr94436.c
Normal file
13
gcc/testsuite/gcc.dg/pr94436.c
Normal file
@ -0,0 +1,13 @@
|
||||
/* 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" } */
|
||||
}
|
Loading…
Reference in New Issue
Block a user