diff options
author | Mark Shinwell <shinwell@codesourcery.com> | 2008-07-02 09:19:11 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2008-07-02 09:19:11 +0000 |
commit | 5bc4fa7cd233b51763a33bbc22c2eb55e218fbac (patch) | |
tree | e5b862481ea80992a2a879035940e71e3260c2e0 | |
parent | 5f0d975b0d6f1d2f866ce4deab49da8f9ab13366 (diff) | |
download | gcc-5bc4fa7cd233b51763a33bbc22c2eb55e218fbac.zip gcc-5bc4fa7cd233b51763a33bbc22c2eb55e218fbac.tar.gz gcc-5bc4fa7cd233b51763a33bbc22c2eb55e218fbac.tar.bz2 |
* final.c (asm_insn_count): Return zero for an empty asm body.
From-SVN: r137346
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/final.c | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3f1a21e..e9562f3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2008-07-02 Mark Shinwell <shinwell@codesourcery.com> + + * final.c (asm_insn_count): Return zero for an empty asm body. + 2008-07-02 Richard Guenther <rguenther@suse.de> * bitmap.h (bitmap_set_bit): Return bool. diff --git a/gcc/final.c b/gcc/final.c index 1f673fb..cbdb3f1 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') |