Avoid a possible compiler bug by using a static buffer instead of a stack local buffer.
authorNick Clifton <nickc@redhat.com>
Thu, 15 Jun 2017 11:44:23 +0000 (12:44 +0100)
committerNick Clifton <nickc@redhat.com>
Thu, 15 Jun 2017 11:44:23 +0000 (12:44 +0100)
PR binutils/21582
* ieee.c (ieee_object_p): Use a static buffer to avoid compiler
bugs.

bfd/ChangeLog
bfd/ieee.c

index f39dd09..7cbd761 100644 (file)
@@ -1,5 +1,11 @@
 2017-06-15  Nick Clifton  <nickc@redhat.com>
 
+       PR binutils/21582
+       * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
+       bugs.
+
+2017-06-15  Nick Clifton  <nickc@redhat.com>
+
        PR binutils/21579
        * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
 
index 763c2b8..0884d87 100644 (file)
@@ -1873,7 +1873,7 @@ ieee_object_p (bfd *abfd)
   char *processor;
   unsigned int part;
   ieee_data_type *ieee;
-  unsigned char buffer[300];
+  static unsigned char buffer[300];
   ieee_data_type *save = IEEE_DATA (abfd);
   bfd_size_type amt;