This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, committed] PR 57589: Fix logic error in driver-rs6000.c


I committed the following patch as obvious, after making sure it builds and has
no regressions.  I was looking at driver-rs6000.c today, and I noticed that it
was returning an address to an auto buffer for processing -mcpu=native.

2013-06-11  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/57589
	* config/rs6000/driver-rs6000.c (elf_platform): Make buffer static
	to allow returning address to AT_PLATFORM name.

Index: gcc/config/rs6000/driver-rs6000.c
===================================================================
--- gcc/config/rs6000/driver-rs6000.c	(revision 199965)
+++ gcc/config/rs6000/driver-rs6000.c	(working copy)
@@ -167,7 +167,7 @@ elf_platform (void)
 
   if (fd != -1)
     {
-      char buf[1024];
+      static char buf[1024];
       ElfW(auxv_t) *av;
       ssize_t n;
 

-- 
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460, USA
email: meissner@linux.vnet.ibm.com, phone: +1 (978) 899-4797


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]