[PATCH] D72491: [X86] Bugfix for rL146415
Bing Yu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 9 19:03:05 PST 2020
yubing created this revision.
yubing added reviewers: pengfei, craig.topper, RKSimon, LuoYuanke.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
[X86] Bugfix for rL146415 <https://reviews.llvm.org/rL146415>
modify this testcase for both i386 and amd64
Repository:
rT test-suite
https://reviews.llvm.org/D72491
Files:
SingleSource/UnitTests/ms_struct-bitfield-1.c
Index: SingleSource/UnitTests/ms_struct-bitfield-1.c
===================================================================
--- SingleSource/UnitTests/ms_struct-bitfield-1.c
+++ SingleSource/UnitTests/ms_struct-bitfield-1.c
@@ -25,12 +25,21 @@
int sizeof_packoddity = sizeof(PackOddity);
int offsetof_foo = offsetof(PackOddity, foo);
int offsetof_pv2 = offsetof(PackOddity, pv2);
+#if defined(__i386)
+ if (sizeof_packoddity != 20)
+ abort();
+ if (offsetof_foo != 4)
+ abort();
+ if (offsetof_pv2 != 16)
+ abort();
+#else
if (sizeof_packoddity != 40)
abort();
if (offsetof_foo != 8)
abort();
if (offsetof_pv2 != 32)
abort();
+#endif
return 0;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72491.237233.patch
Type: text/x-patch
Size: 760 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200110/9d19c92f/attachment.bin>
More information about the llvm-commits
mailing list