diff options
author | Martin Liska <mliska@suse.cz> | 2017-01-13 13:56:54 +0100 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2017-01-13 12:56:54 +0000 |
commit | 77719b0675a248bcf9cb0876a86e80ca54979601 (patch) | |
tree | ee2c1eda6fcc5175948e6466e036b6bf04e1ee12 /gcc/testsuite/gcc.c-torture | |
parent | b1c95bb595d159b769409063df40414b9c830009 (diff) | |
download | gcc-77719b0675a248bcf9cb0876a86e80ca54979601.zip gcc-77719b0675a248bcf9cb0876a86e80ca54979601.tar.gz gcc-77719b0675a248bcf9cb0876a86e80ca54979601.tar.bz2 |
Reload global options when strict aliasing is dropped (PR ipa/79043).
2017-01-13 Martin Liska <mliska@suse.cz>
PR ipa/79043
* function.c (set_cfun): Add new argument force.
* function.h (set_cfun): Likewise.
* ipa-inline-transform.c (inline_call): Use the function when
strict alising from is dropped for function we inline to.
2017-01-13 Martin Liska <mliska@suse.cz>
PR ipa/79043
* gcc.c-torture/execute/pr79043.c: New test.
From-SVN: r244435
Diffstat (limited to 'gcc/testsuite/gcc.c-torture')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/pr79043.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr79043.c b/gcc/testsuite/gcc.c-torture/execute/pr79043.c new file mode 100644 index 0000000..b7fcc82 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr79043.c @@ -0,0 +1,21 @@ +/* PR ipa/78791 */ + +int val; + +int *ptr = &val; +float *ptr2 = &val; + +static +__attribute__((always_inline, optimize ("-fno-strict-aliasing"))) +typepun () +{ + *ptr2=0; +} + +main() +{ + *ptr=1; + typepun (); + if (*ptr) + __builtin_abort (); +} |