int main(void) {
  _Complex double a = 1.0 + 1.0 * (__extension__ 1.0iF), b = 0.0, c;
  asm("" : "=m"(a) : "m"(a));
  asm("" : "=m"(b) : "m"(b));
  c = a / b;
  if (!__builtin_isinf(__real__ c) && !__builtin_isinf(__imag__ c))
    abort();
  a = 0.0;
  asm("" : "=m"(a) : "m"(a));
  asm("" : "=m"(b) : "m"(b));
  c = a / b;
  if (!__builtin_isnan(__real__ c) || !__builtin_isnan(__imag__ c))
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xee1(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xed4(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
call   1230 <__divdc3>
movsd  %xmm0,-0x38(%rbp)
movsd  %xmm1,-0x30(%rbp)
movsd  -0x38(%rbp),%xmm0
movaps 0xe98(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0xe7c(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1199 <main+0x89>
jp     1199 <main+0x89>
jmp    11cb <main+0xbb>
movsd  -0x30(%rbp),%xmm0
movaps 0xe6b(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0xe4f(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    11c6 <main+0xb6>
jp     11c6 <main+0xb6>
jmp    11cb <main+0xbb>
call   1030 <abort@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
call   1230 <__divdc3>
movsd  %xmm0,-0x38(%rbp)
movsd  %xmm1,-0x30(%rbp)
movsd  -0x38(%rbp),%xmm0
ucomisd %xmm0,%xmm0
jnp    121c <main+0x10c>
movsd  -0x30(%rbp),%xmm0
ucomisd %xmm0,%xmm0
jp     1221 <main+0x111>
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret
nopl   0x0(%rax)

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
movsd  0x18(%rsp),%xmm3
call   11b0 <__divdc3>
movapd 0xec5(%rip),%xmm2
andpd  %xmm2,%xmm0
ucomisd 0xed9(%rip),%xmm0
jae    1167 <main+0x57>
andpd  %xmm2,%xmm1
ucomisd 0xecb(%rip),%xmm1
jb     119f <main+0x8f>
xorpd  %xmm0,%xmm0
movapd %xmm0,(%rsp)
movsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
movsd  0x18(%rsp),%xmm3
call   11b0 <__divdc3>
ucomisd %xmm0,%xmm0
jnp    119f <main+0x8f>
ucomisd %xmm1,%xmm1
jnp    119f <main+0x8f>
xor    %eax,%eax
add    $0x28,%rsp
ret
call   1030 <abort@plt>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca { double, double }
%3 = alloca { double, double }
%4 = alloca { double, double }
store i32 0, i32* %1
%5 = getelementptr inbounds { double, double }, { double, double }* %2, i32 0, i32 0
%6 = getelementptr inbounds { double, double }, { double, double }* %2, i32 0, i32 1
store double 1.000000e+00, double* %5
store double 1.000000e+00, double* %6
%7 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 0
%8 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 1
store double 0.000000e+00, double* %7
store double 0.000000e+00, double* %8
%9 = getelementptr inbounds { double, double }, { double, double }* %2, i32 0, i32 0
%10 = load double, double* %9
%11 = getelementptr inbounds { double, double }, { double, double }* %2, i32 0, i32 1
%12 = load double, double* %11
%13 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 0
%14 = load double, double* %13
%15 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 1
%16 = load double, double* %15
%17 = call { double, double } @__divdc3(double %10, double %12, double %14, double %16)
%18 = extractvalue { double, double } %17, 0
%19 = extractvalue { double, double } %17, 1
%20 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 0
%21 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 1
store double %18, double* %20
store double %19, double* %21
%22 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 0
%23 = load double, double* %22
%24 = call double @llvm.fabs.f64(double %23)
%25 = fcmp oeq double %24, 0x7FF0000000000000
br i1 %25, label %32, label %26
26: ; preds = %0
%27 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 1
%28 = load double, double* %27
%29 = call double @llvm.fabs.f64(double %28)
%30 = fcmp oeq double %29, 0x7FF0000000000000
br i1 %30, label %32, label %31
31: ; preds = %26
unreachable
32: ; preds = %26, %0
%33 = getelementptr inbounds { double, double }, { double, double }* %2, i32 0, i32 0
%34 = getelementptr inbounds { double, double }, { double, double }* %2, i32 0, i32 1
store double 0.000000e+00, double* %33
store double 0.000000e+00, double* %34
%35 = getelementptr inbounds { double, double }, { double, double }* %2, i32 0, i32 0
%36 = load double, double* %35
%37 = getelementptr inbounds { double, double }, { double, double }* %2, i32 0, i32 1
%38 = load double, double* %37
%39 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 0
%40 = load double, double* %39
%41 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 1
%42 = load double, double* %41
%43 = call { double, double } @__divdc3(double %36, double %38, double %40, double %42)
%44 = extractvalue { double, double } %43, 0
%45 = extractvalue { double, double } %43, 1
%46 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 0
%47 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 1
store double %44, double* %46
store double %45, double* %47
%48 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 0
%49 = load double, double* %48
%50 = fcmp uno double %49, %49
br i1 %50, label %51, label %55
51: ; preds = %32
%52 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 1
%53 = load double, double* %52
%54 = fcmp uno double %53, %53
br i1 %54, label %56, label %55
55: ; preds = %51, %32
unreachable
56: ; preds = %51
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca <2 x double>
%2 = bitcast <2 x double>* %1 to { double, double }*
%3 = alloca { double, double }
%4 = bitcast <2 x double>* %1 to i8*
%5 = getelementptr inbounds <2 x double>, <2 x double>* %1, i64 0, i64 0
%6 = getelementptr inbounds <2 x double>, <2 x double>* %1, i64 0, i64 1
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %1
%7 = bitcast { double, double }* %3 to i8*
%8 = getelementptr inbounds { double, double }, { double, double }* %3, i64 0, i32 0
%9 = getelementptr inbounds { double, double }, { double, double }* %3, i64 0, i32 1
%10 = bitcast { double, double }* %3 to i8*
%11 = load double, double* %5
%12 = load double, double* %6
%13 = load double, double* %8
%14 = load double, double* %9
%15 = call { double, double } @__divdc3(double %11, double %12, double %13, double %14)
%16 = extractvalue { double, double } %15, 0
%17 = call double @llvm.fabs.f64(double %16)
%18 = fcmp oeq double %17, 0x7FF0000000000000
%19 = extractvalue { double, double } %15, 1
%20 = call double @llvm.fabs.f64(double %19)
%21 = fcmp oeq double %20, 0x7FF0000000000000
%22 = select i1 %18, i1 true, i1 %21
br i1 %22, label %24, label %23
23: ; preds = %0
unreachable
24: ; preds = %0
%25 = bitcast <2 x double>* %1 to i8*
%26 = load double, double* %5
%27 = load double, double* %6
%28 = load double, double* %8
%29 = load double, double* %9
%30 = call { double, double } @__divdc3(double %26, double %27, double %28, double %29)
%31 = extractvalue { double, double } %30, 0
%32 = extractvalue { double, double } %30, 1
%33 = fcmp uno double %31, 0.000000e+00
%34 = fcmp uno double %32, 0.000000e+00
%35 = select i1 %33, i1 %34, i1 false
br i1 %35, label %37, label %36
36: ; preds = %24
unreachable
37: ; preds = %24
ret i32 0
}