[llvm-bugs] [Bug 44190] New: wrong code with #pragma pack(1)

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Dec 1 02:37:49 PST 2019


            Bug ID: 44190
           Summary: wrong code with #pragma pack(1)
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: SystemZ
          Assignee: unassignedbugs at nondot.org
          Reporter: paulsson at linux.vnet.ibm.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 22883
  --> https://bugs.llvm.org/attachment.cgi?id=22883&action=edit
reduced csmith testcase

The attached program incorrectly prints 'checksum = 1'. If the #pragma is
removed, 'checksum = 0' is printed, which seems to be the correct value.

Not sure exactly what goes wrong, but I suppose this #pragma should never
change the result of the program...

Also fails without the '__attribute__ ((noinline))'.

clang -O3 -march=z13 wrong_packed.i

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/20191201/f77d8fac/attachment.html>

More information about the llvm-bugs mailing list