void flexible_member() {
  struct {
    int a, b[];
  } x;
  fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/struct.c",
          289, 4, sizeof(x));
  ;
  struct {
    int a, b[0];
  } y;
  fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/struct.c",
          291, 4, sizeof(y));
  ;
  struct {
    int a[0];
  } z;
  fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/struct.c",
          293, 0, sizeof(z));
  ;
}


x86 assembly (clang, -O0):
<flexible_member>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xee1(%rip),%rdi
mov    $0x121,%esi
mov    $0x4,%edx
mov    $0x4,%ecx
mov    $0x0,%al
call   1030 <fexpect@plt>
lea    0xec4(%rip),%rdi
mov    $0x123,%esi
mov    $0x4,%edx
mov    $0x4,%ecx
mov    $0x0,%al
call   1030 <fexpect@plt>
lea    0xea7(%rip),%rdi
mov    $0x125,%esi
xor    %edx,%edx
xor    %eax,%eax
mov    %eax,%ecx
mov    $0x0,%al
call   1030 <fexpect@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<flexible_member>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    $0x4,%ecx
mov    %rbx,%rdi
mov    $0x121,%esi
mov    $0x4,%edx
xor    %eax,%eax
call   1030 <fexpect@plt>
mov    $0x4,%ecx
mov    %rbx,%rdi
mov    $0x123,%esi
mov    $0x4,%edx
xor    %eax,%eax
call   1030 <fexpect@plt>
mov    %rbx,%rdi
mov    $0x125,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %eax,%eax
pop    %rbx
jmp    1030 <fexpect@plt>

LLVM IR (-O0):
%struct.anon = type { i32, [0 x i32] }
%struct.anon.0 = type { i32, [0 x i32] }
%struct.anon.1 = type { [0 x i32] }
@.str = [129 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/struct.c\00"
define void @flexible_member() {
%1 = alloca %struct.anon
%2 = alloca %struct.anon.0
%3 = alloca %struct.anon.1
%4 = call i32 (i8*, i32, i32, i64, ...) bitcast (i32 (...)* @fexpect to i32 (i8*, i32, i32, i64, ...)*)(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 289, i32 4, i64 4)
%5 = call i32 (i8*, i32, i32, i64, ...) bitcast (i32 (...)* @fexpect to i32 (i8*, i32, i32, i64, ...)*)(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 291, i32 4, i64 4)
%6 = call i32 (i8*, i32, i32, i64, ...) bitcast (i32 (...)* @fexpect to i32 (i8*, i32, i32, i64, ...)*)(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 293, i32 0, i64 0)
ret void
}

LLVM IR (-O2):
%struct.anon.1 = type { [0 x i32] }
@.str = [129 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/struct.c\00"
define void @flexible_member() {
%1 = tail call i32 (i8*, i32, i32, i64, ...) bitcast (i32 (...)* @fexpect to i32 (i8*, i32, i32, i64, ...)*)(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 289, i32 4, i64 4)
%2 = tail call i32 (i8*, i32, i32, i64, ...) bitcast (i32 (...)* @fexpect to i32 (i8*, i32, i32, i64, ...)*)(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 291, i32 4, i64 4)
%3 = tail call i32 (i8*, i32, i32, i64, ...) bitcast (i32 (...)* @fexpect to i32 (i8*, i32, i32, i64, ...)*)(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 293, i32 0, i64 0)
ret void
}