* gcc.c-torture/execute/alias-4.c: New testcase.

From-SVN: r232411
This commit is contained in:
Jan Hubicka 2016-01-15 12:02:29 +01:00 committed by Jan Hubicka
parent 824ca15e29
commit 0f6176e67c
2 changed files with 23 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2016-01-15 Jan Hubicka <hubicka@ucw.cz>
* gcc.c-torture/execute/alias-4.c: New testcase.
2016-01-15 Jan Hubicka <hubicka@ucw.cz>
PR ipa/68148

View File

@ -0,0 +1,19 @@
/* { dg-require-alias "" } */
int a = 1;
extern int b __attribute__ ((alias ("a")));
int c = 1;
extern int d __attribute__ ((alias ("c")));
main (int argc)
{
int *p;
int *q;
if (argc)
p = &a, q = &b;
else
p = &c, q = &d;
*p = 1;
*q = 2;
if (*p == 1)
__builtin_abort ();
return 0;
}