From: Jan Hubicka Date: Tue, 24 Nov 2015 03:58:47 +0000 (+0100) Subject: * gcc.c-torture/execute/lto-tbaa-1.c: New testcase. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=267c9702f6223ed5b9694b8ba746ca7b344ec1ac;p=gcc.git * gcc.c-torture/execute/lto-tbaa-1.c: New testcase. From-SVN: r230784 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 61b3e757a80..2114f8fa85f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2015-11-23 Jan Hubicka + + * gcc.c-torture/execute/lto-tbaa-1.c: New testcase. + 2015-11-23 David Malcolm PR objc/68438 diff --git a/gcc/testsuite/gcc.c-torture/execute/lto-tbaa-1.c b/gcc/testsuite/gcc.c-torture/execute/lto-tbaa-1.c new file mode 100644 index 00000000000..fe1e1771c7f --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/lto-tbaa-1.c @@ -0,0 +1,42 @@ +/* { dg-additional-options "-fno-early-inlining -fno-ipa-cp" } */ +struct a { + float *b; +} *a; +struct b { + int *b; +} b; +struct c { + float *b; +} *c; +int d; +use_a (struct a *a) +{ +} +set_b (int **a) +{ + *a=&d; +} +use_c (struct c *a) +{ +} +__attribute__ ((noinline)) int **retme(int **val) +{ + return val; +} +int e; +struct b b= {&e}; +struct b b2; +struct b b3; +int **ptr = &b2.b; +main () +{ + a= (void *)0; + b.b=&e; + ptr =retme ( &b.b); + set_b (ptr); + b3=b; + if (b3.b != &d) + __builtin_abort (); + c= (void *)0; + return 0; +}