[llvm-bugs] [Bug 28102] New: clang generates invalid assembly on ppc64le
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Jun 12 23:09:12 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=28102
Bug ID: 28102
Summary: clang generates invalid assembly on ppc64le
Product: clang
Version: 3.5
Hardware: Other
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: unassignedclangbugs at nondot.org
Reporter: kb9vqf at pearsoncomputing.net
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
Classification: Unclassified
Created attachment 16523
--> https://llvm.org/bugs/attachment.cgi?id=16523&action=edit
Test case
When building a large, proprietary codebase against ppc64le for the first time,
clang generated an invalid intermediate assembly file.
Reducing the failing code as much as possible yielded the attached test case.
It generates a significant amount of assembler output, but the most critical
section is:
.L0_0_set_4294967295 = ".LBB0_-1"-.LJTI0_0
.L0_0_set_3 = .LBB0_3-.LJTI0_0
.L0_0_set_4 = .LBB0_4-.LJTI0_0
.L0_0_set_5 = .LBB0_5-.LJTI0_0
There appears to be integer wrap-around causing an invalid .LBB label to be
generated. Reducing the number of the case statements in the switch block
resolved the failure, and the failure remained when adding additional
statements, implying clang is not handling anything over 5 statements correctly
in this case.
clang arguments were:
-fPIC -Wno-switch -Wno-unused-value -fvisibility=hidden -DNDEBUG -g -O2 -v
-save-temps -std=c++11
The relevant sections of the generated assembler file are attached. I (likely)
cannot post code outside of the provided sections due to license restrictions
on the codebase.
Please let me know if you need any further information!
--
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/20160613/e2c51704/attachment-0001.html>
More information about the llvm-bugs
mailing list