<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - [MC][ARM] unexpected token at start of statement while parsing asm directives and identifiers"
href="https://llvm.org/bugs/show_bug.cgi?id=30308">30308</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[MC][ARM] unexpected token at start of statement while parsing asm directives and identifiers
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>MC
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>minseong.kim@linaro.org
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=17220" name="attach_17220" title="Source file">attachment 17220</a> <a href="attachment.cgi?id=17220&action=edit" title="Source file">[details]</a></span>
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).</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>