diff options
author | chrbr <chrbr@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-01-27 13:03:45 +0000 |
---|---|---|
committer | chrbr <chrbr@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-01-27 13:03:45 +0000 |
commit | 7b0c1b6dd66863c7b6e7a379e3fc4acacce45236 (patch) | |
tree | 894ce561eca6774f5039accc83c2303245a3c273 /gcc/testsuite/gcc.target/arm/pr69245.c | |
parent | 874e154a03c28934ac2348aa75059a89167f1ff2 (diff) | |
download | gcc-7b0c1b6dd66863c7b6e7a379e3fc4acacce45236.tar.gz |
2016-01-20 Christian Bruel <christian.bruel@st.com>
PR target/69245
* config/arm/arm-c.c (arm_pragma_target_parse): Add comments.
Move arm_reset_previous_fndecl and set_target_option_current_node in
the conditional part. Call save_restore_target_globals.
* config/arm/arm.c (arm_set_current_function):
Refactor to better support #pragma target and attribute mix.
Call save_restore_target_globals.
* config/arm/arm-protos.h (save_restore_target_globals): New function.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232872 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.target/arm/pr69245.c')
-rw-r--r-- | gcc/testsuite/gcc.target/arm/pr69245.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/arm/pr69245.c b/gcc/testsuite/gcc.target/arm/pr69245.c new file mode 100644 index 00000000000..bd505187728 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/pr69245.c @@ -0,0 +1,26 @@ +/* PR target/69245 */ +/* Test that pop_options restores the vfp fpu mode. */ +/* { dg-do compile } */ +/* { dg-require-effective-target arm_neon_ok } */ +/* { dg-require-effective-target arm_fp_ok } */ +/* { dg-options "-O2" } */ +/* { dg-add-options arm_fp } */ + +#pragma GCC target "fpu=vfp" + +#pragma GCC push_options +#pragma GCC target "fpu=neon-vfpv4" +int a, c, d; +float b; +static int fn1 () +{ + return 0; +} +#pragma GCC pop_options + +void fn2 () +{ + d = b * c + a; +} + +/* { dg-final { scan-assembler-times "\.fpu vfp" 1 } } */ |