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: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to