[LLVMbugs] [Bug 16752] New: Subject: 'mode' attribute for unusual targets doesn't work properly

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jul 30 10:34:19 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=16752

            Bug ID: 16752
           Summary: Subject: 'mode' attribute for unusual targets doesn't
                    work properly
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: stpworld at narod.ru
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 10958
  --> http://llvm.org/bugs/attachment.cgi?id=10958&action=edit
Patch

Troubles could be happened due to some assumptions in handleModeAttr function
(see SemaDeclAttr.cpp).
For example, it assumes that 32 bit integer is 'int', while it could be 16 bit
only.
Instead of asking target: 'which type do you want to use for int32_t ?' it just
hardcodes general opinion. That doesn't looks pretty correct.
Please consider the next solution:
1. In Basic/TargetInfo add getIntTypeByWidth and getRealTypeByWidth virtual
methods. By default current behaviour could be implemented here.
2. Fix handleModeAttr according to new methods in TargetInfo.
This approach is implemented in the patch attached to this post.

-- 
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/20130730/b53144fd/attachment.html>


More information about the llvm-bugs mailing list