aboutsummaryrefslogtreecommitdiff
path: root/gcc/genattr.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/genattr.c')
-rw-r--r--gcc/genattr.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/genattr.c b/gcc/genattr.c
index 27123d8..bb7ccbf 100644
--- a/gcc/genattr.c
+++ b/gcc/genattr.c
@@ -279,11 +279,9 @@ from the machine description file `md'. */\n\n");
if (unit == 0)
{
- int len = strlen (name) + 1;
unit = (struct function_unit *)
- alloca (sizeof (struct function_unit));
- unit->name = (char *) alloca (len);
- memcpy (unit->name, name, len);
+ xmalloc (sizeof (struct function_unit));
+ unit->name = xstrdup (name);
unit->multiplicity = multiplicity;
unit->simultaneity = simultaneity;
unit->ready_cost.min = unit->ready_cost.max = ready_cost;