[GCC Patch] AIX fix for PR 5584
Craig Rodrigues
rodrigc@mediaone.net
Mon Feb 4 16:38:00 GMT 2002
Hi,
The following fixes PR 5584:
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5584
This problem does not exist on the mainline, and only applies
to the branch. Is it OK?
2002-02-04 Craig Rodrigues <rodrigc@gcc.gnu.org>
PR target/5584
* config/rs6000/aix.h (UNIQUE_SECTION): Fix use of alloca.
Index: aix.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/aix.h,v
retrieving revision 1.15.2.4
diff -u -r1.15.2.4 aix.h
--- aix.h 2001/11/09 23:00:30 1.15.2.4
+++ aix.h 2002/02/05 00:14:17
@@ -579,7 +579,7 @@
if (TREE_CODE (DECL) == FUNCTION_DECL) { \
name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (DECL)); \
len = strlen (name) + 5; \
- string = alloca (len) + 1; \
+ string = alloca (len + 1); \
sprintf (string, ".%s[PR]", name); \
DECL_SECTION_NAME (DECL) = build_string (len, string); \
} \
--
Craig Rodrigues
http://www.gis.net/~craigr
rodrigc@mediaone.net
More information about the Gcc-patches
mailing list