From 39178486b7be0b8fda4fc391b2f2892593bf0f78 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Sun, 27 Feb 1994 10:47:55 -0500 Subject: [PATCH] (final_scan_insn): Always set OPS and use alloca. From-SVN: r6643 --- gcc/final.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/gcc/final.c b/gcc/final.c index 53cf97b455c..23541ef5580 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -1627,7 +1627,7 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes) if (asm_noperands (body) >= 0) { int noperands = asm_noperands (body); - rtx *ops; + rtx *ops = (rtx *) alloca (noperands * sizeof (rtx)); char *string; /* There's no telling what that did to the condition codes. */ @@ -1635,11 +1635,6 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes) if (prescan > 0) break; - /* alloca won't do here, since only return from `final' - would free it. */ - if (noperands > 0) - ops = (rtx *) xmalloc (noperands * sizeof (rtx)); - if (! app_on) { fprintf (file, ASM_APP_ON); @@ -1652,11 +1647,10 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes) /* Inhibit aborts on what would otherwise be compiler bugs. */ insn_noperands = noperands; this_is_asm_operands = insn; + /* Output the insn using them. */ output_asm_insn (string, ops); this_is_asm_operands = 0; - if (noperands > 0) - free (ops); break; } -- 2.30.2