ipa-inline-transform.c (inline_call): Drop -fstrict-aliasing when inlining -fno-strict-aliasing into...
* ipa-inline-transform.c (inline_call): Drop -fstrict-aliasing when inlining -fno-strict-aliasing into -fstrict-aliasing body. * gcc.dg/lto/alias-1_0.c: New testcase. * gcc.dg/lto/alias-1_1.c: New testcase. From-SVN: r231094
This commit is contained in:
parent
341946d801
commit
6fa04359f8
4 changed files with 40 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2015-11-30 Jan Hubicka <hubicka@ucw.cz>
|
||||
|
||||
* ipa-inline-transform.c (inline_call): Drop -fstrict-aliasing when
|
||||
inlining -fno-strict-aliasing into -fstrict-aliasing body.
|
||||
|
||||
2015-11-30 Aditya Kumar <aditya.k7@samsung.com>
|
||||
Sebastian Pop <s.pop@samsung.com>
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2015-11-30 Jan Hubicka <hubicka@ucw.cz>
|
||||
|
||||
* gcc.dg/lto/alias-1_0.c: New testcase.
|
||||
* gcc.dg/lto/alias-1_1.c: New testcase.
|
||||
|
||||
2015-11-30 Aditya Kumar <aditya.k7@samsung.com>
|
||||
Sebastian Pop <s.pop@samsung.com>
|
||||
|
||||
|
|
23
gcc/testsuite/gcc.dg/lto/alias-1_0.c
Normal file
23
gcc/testsuite/gcc.dg/lto/alias-1_0.c
Normal file
|
@ -0,0 +1,23 @@
|
|||
/* { dg-lto-do run } */
|
||||
/* { dg-lto-options { { -O2 -flto } } } */
|
||||
int val;
|
||||
|
||||
__attribute__ ((used))
|
||||
int *ptr = &val;
|
||||
__attribute__ ((used))
|
||||
float *ptr2 = (void *)&val;
|
||||
|
||||
extern void typefun(float val);
|
||||
|
||||
void link_error (void);
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
*ptr=1;
|
||||
typefun (0);
|
||||
if (*ptr)
|
||||
__builtin_abort ();
|
||||
return 0;
|
||||
}
|
||||
|
7
gcc/testsuite/gcc.dg/lto/alias-1_1.c
Normal file
7
gcc/testsuite/gcc.dg/lto/alias-1_1.c
Normal file
|
@ -0,0 +1,7 @@
|
|||
/* { dg-options "-fno-strict-aliasing" } */
|
||||
extern float *ptr2;
|
||||
void
|
||||
typefun (float val)
|
||||
{
|
||||
*ptr2=val;
|
||||
}
|
Loading…
Add table
Reference in a new issue