[LLVMbugs] [Bug 21376] New: Wrong templated member initializations done for locally-defined structs with same name

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Oct 24 17:47:09 PDT 2014


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

            Bug ID: 21376
           Summary: Wrong templated member initializations done for
                    locally-defined structs with same name
           Product: clang
           Version: unspecified
          Hardware: Other
                OS: other
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: John.Thompson.JTSoftware at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 13246
  --> http://llvm.org/bugs/attachment.cgi?id=13246&action=edit
Reduced reproduction sample

In a proprietary unit test that worked with a previous version of clang (Sony's
Orbis flavor) and other compilers, in a new version of the compiler some code
started breaking.  Basically I define some structs with the same names in
separate local blocks with templated members to mimic the layout of a memory
arena in a templated function with different alignments, but in the code
generated, they all seem to reference the initializer for the first version of
the struct, such that later members don't get initialized.  The work-around is
to use different names for the structs.  I've enclosed a reduced repo.  See the
comments in the repo for further details.

Thanks.

-- 
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/20141025/e81daa6e/attachment.html>


More information about the llvm-bugs mailing list