[llvm-bugs] [Bug 30308] New: [MC][ARM] unexpected token at start of statement while parsing asm directives and identifiers

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Sep 7 02:10:11 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=30308

            Bug ID: 30308
           Summary: [MC][ARM] unexpected token at start of statement while
                    parsing asm directives and identifiers
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: MC
          Assignee: unassignedbugs at nondot.org
          Reporter: minseong.kim at linaro.org
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 17220
  --> https://llvm.org/bugs/attachment.cgi?id=17220&action=edit
Source file

The following returns an error while this should work:

../llvm/build/install/bin/clang -c -mthumb -Os -fomit-frame-pointer
-fno-strict-aliasing -fno-exceptions -Wno-multichar -ffunction-sections
-fdata-sections -funwind-tables -fstack-protector-strong -Wa,--noexecstack
-Werror=format-security -D_FORTIFY_SOURCE=2 -fno-short-enums
-no-canonical-prefixes -DNDEBUG -g -Wstrict-aliasing=2 -DANDROID
-fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -DNDEBUG
-UDEBUG -fdebug-prefix-map=/proc/self/cwd=
-D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion
-Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument
-fcolor-diagnostics -Wno-expansion-to-defined -Werror=return-type
-Werror=non-virtual-dtor -Werror=address -Werror=sequence-point
-Werror=date-time -nostdlibinc -msoft-float -mfloat-abi=softfp -mfpu=neon
-mcpu=cortex-a15 -D__ARM_FEATURE_LPAE=1 -D_LIBC=1 -Wall -Wextra -Wunused
-Wno-deprecated-declarations -Wframe-larger-than=2048
-Werror=pointer-to-int-cast -Werror=int-to-pointer-cast -Werror=type-limits
-Werror -target arm-linux-androideabi -o dummy.o dummy.S
__bionic_clone.S:21:4: error: unexpected token at start of statement
1: # The child.
   ^

It seems that this happens when the two asm directives/identifiers are in one
line. When the label "1:" is moved to another location where no
directives/identifiers are present as the following, the error goes away:

    # Are we the child?
    movs    r0, r0
    beq     1f

    # The child.
    # Setting lr to 0 will make the unwinder stop at __start_thread
1:  mov    lr, #0

I have attached the source (dummy.S).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160907/5b7351a8/attachment.html>


More information about the llvm-bugs mailing list