diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/arm/arm.c | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/arm/lto/pr96939_0.c | 15 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/arm/lto/pr96939_1.c | 10 |
3 files changed, 27 insertions, 4 deletions
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index dd78141..37fc15c 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -3037,10 +3037,6 @@ arm_override_options_after_change_1 (struct gcc_options *opts) static void arm_override_options_after_change (void) { - arm_configure_build_target (&arm_active_target, - TREE_TARGET_OPTION (target_option_default_node), - &global_options_set, false); - arm_override_options_after_change_1 (&global_options); } @@ -32338,6 +32334,8 @@ arm_set_current_function (tree fndecl) cl_target_option_restore (&global_options, TREE_TARGET_OPTION (new_tree)); save_restore_target_globals (new_tree); + + arm_override_options_after_change_1 (&global_options); } /* Implement TARGET_OPTION_PRINT. */ diff --git a/gcc/testsuite/gcc.target/arm/lto/pr96939_0.c b/gcc/testsuite/gcc.target/arm/lto/pr96939_0.c new file mode 100644 index 0000000..241ffd5 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/lto/pr96939_0.c @@ -0,0 +1,15 @@ +/* PR target/96939 */ +/* { dg-lto-do link } */ +/* { dg-require-effective-target arm_arch_v8a_ok } */ +/* { dg-lto-options { { -flto -O2 } } } */ + +extern unsigned crc (unsigned, const void *); +typedef unsigned (*fnptr) (unsigned, const void *); +volatile fnptr fn; + +int +main () +{ + fn = crc; + return 0; +} diff --git a/gcc/testsuite/gcc.target/arm/lto/pr96939_1.c b/gcc/testsuite/gcc.target/arm/lto/pr96939_1.c new file mode 100644 index 0000000..53c6093 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/lto/pr96939_1.c @@ -0,0 +1,10 @@ +/* PR target/96939 */ +/* { dg-options "-march=armv8-a+crc" } */ + +#include <arm_acle.h> + +unsigned +crc (unsigned x, const void *y) +{ + return __crc32cw (x, *(unsigned *) y); +} |