d: Fix wrong code-gen when returning structs by value.
[official-gcc.git] / gcc / testsuite / gdc.dg / torture / pr110406.d
blobc380e4bdec8671c78ea2ad762200ec0eababf98a
1 // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110406
2 // { dg-do compile { target i?86-*-* x86_64-*-* } }
3 // { dg-options "-fdump-tree-optimized" }
4 struct cpuid_abcd_t
6 uint eax;
7 uint ebx;
8 uint ecx;
9 uint edx;
12 cpuid_abcd_t cpuid_insn(const uint in_eax)
14 cpuid_abcd_t ret = void;
15 asm { "cpuid"
16 : "=a" (ret.eax),
17 "=b" (ret.ebx),
18 "=c" (ret.ecx),
19 "=d" (ret.edx)
20 : "a" (in_eax)
23 return ret;
25 // { dg-final { scan-tree-dump-not "MEM <vector\\(4\\) uint>" "optimized" } }