Hi,
The attached patch tries to fix PR83775.
Validation in progress.
OK to commit if passes ?

Thanks,
Prathamesh
2018-01-11  Prathamesh Kulkarni  <prathamesh.kulka...@linaro.org>

        PR target/83775
        * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
        targ_options->x_arm_arch_string is non NULL.

diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 196aa6de1ac..868251a154c 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -30954,7 +30954,10 @@ arm_declare_function_name (FILE *stream, const char 
*name, tree decl)
 
   /* Only update the assembler .arch string if it is distinct from the last
      such string we printed.  */
-  std::string arch_to_print = targ_options->x_arm_arch_string;
+  std::string arch_to_print;
+  if (targ_options->x_arm_arch_string)
+    arch_to_print = targ_options->x_arm_arch_string;
+
   if (arch_to_print != arm_last_printed_arch_string)
     {
       std::string arch_name

Reply via email to