summaryrefslogtreecommitdiff
path: root/gcc/final.c
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2008-07-02 09:19:11 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2008-07-02 09:19:11 +0000
commitc3e8950706b6636e6502860d02fbeaee3c688d2c (patch)
treee5b862481ea80992a2a879035940e71e3260c2e0 /gcc/final.c
parentb64035d26781d55d69ea9e56fbc604258ff05e4f (diff)
downloadgcc-c3e8950706b6636e6502860d02fbeaee3c688d2c.tar.gz
* final.c (asm_insn_count): Return zero for an empty asm body.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137346 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/final.c')
-rw-r--r--gcc/final.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/final.c b/gcc/final.c
index 1f673fb7858..cbdb3f1bfdd 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -1385,6 +1385,9 @@ asm_insn_count (rtx body)
else
template = decode_asm_operands (body, NULL, NULL, NULL, NULL, NULL);
+ if (!*template)
+ return 0;
+
for (; *template; template++)
if (IS_ASM_LOGICAL_LINE_SEPARATOR (*template, template)
|| *template == '\n')