void main() {
  struct Test {
    int Num;
    char *pcName;
    short sDate;
    char cha[2];
    short sBa[4];
  } * p;
  printf("sizeof(*p) = %d,*p = %d\n", sizeof(*p), *p);
  printf("%p %p %p\n", p, p + 1, p + 0x1);
  printf("%p %p %p\n", (unsigned long)p, (unsigned long)p + 1,
         (unsigned long)p + 0x1);
  printf("%p %p %p\n", (unsigned long *)p, (unsigned long *)p + 1,
         (unsigned long *)p + 0x1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    -0x8(%rbp),%rax
lea    0xedd(%rip),%rdi
mov    $0x20,%esi
mov    (%rax),%rcx
mov    %rcx,(%rsp)
mov    0x8(%rax),%rcx
mov    %rcx,0x8(%rsp)
mov    0x10(%rax),%rcx
mov    %rcx,0x10(%rsp)
mov    0x18(%rax),%rax
mov    %rax,0x18(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
mov    -0x8(%rbp),%rdx
add    $0x20,%rdx
mov    -0x8(%rbp),%rcx
add    $0x20,%rcx
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
mov    -0x8(%rbp),%rdx
add    $0x1,%rdx
mov    -0x8(%rbp),%rcx
add    $0x1,%rcx
lea    0xe8b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
mov    -0x8(%rbp),%rdx
add    $0x8,%rdx
mov    -0x8(%rbp),%rcx
add    $0x8,%rcx
lea    0xe69(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xee4(%rip),%rdi
mov    $0x20,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeea(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.Test = type { i32, i8*, i16, [2 x i8], [4 x i16] }
@.str = [25 x i8] c"sizeof(*p) = %d,*p = %d\0A\00"
@.str.1 = [10 x i8] c"%p %p %p\0A\00"
define void @main() {
%1 = alloca %struct.Test*
%2 = load %struct.Test*, %struct.Test** %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i64 32, %struct.Test* byval(%struct.Test) align 8 %2)
%4 = load %struct.Test*, %struct.Test** %1
%5 = load %struct.Test*, %struct.Test** %1
%6 = getelementptr inbounds %struct.Test, %struct.Test* %5, i64 1
%7 = load %struct.Test*, %struct.Test** %1
%8 = getelementptr inbounds %struct.Test, %struct.Test* %7, i64 1
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), %struct.Test* %4, %struct.Test* %6, %struct.Test* %8)
%10 = load %struct.Test*, %struct.Test** %1
%11 = ptrtoint %struct.Test* %10 to i64
%12 = load %struct.Test*, %struct.Test** %1
%13 = ptrtoint %struct.Test* %12 to i64
%14 = add i64 %13, 1
%15 = load %struct.Test*, %struct.Test** %1
%16 = ptrtoint %struct.Test* %15 to i64
%17 = add i64 %16, 1
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i64 %11, i64 %14, i64 %17)
%19 = load %struct.Test*, %struct.Test** %1
%20 = bitcast %struct.Test* %19 to i64*
%21 = load %struct.Test*, %struct.Test** %1
%22 = bitcast %struct.Test* %21 to i64*
%23 = getelementptr inbounds i64, i64* %22, i64 1
%24 = load %struct.Test*, %struct.Test** %1
%25 = bitcast %struct.Test* %24 to i64*
%26 = getelementptr inbounds i64, i64* %25, i64 1
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i64* %20, i64* %23, i64* %26)
ret void
}

LLVM IR (-O2):
%struct.Test = type { i32, i8*, i16, [2 x i8], [4 x i16] }
@.str = [25 x i8] c"sizeof(*p) = %d,*p = %d\0A\00"
@.str.1 = [10 x i8] c"%p %p %p\0A\00"
define void @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i64 32, %struct.Test* byval(%struct.Test) align 8 undef)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), %struct.Test* undef, %struct.Test* poison, %struct.Test* poison)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i64 undef, i64 undef, i64 undef)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i64* undef, i64* poison, i64* poison)
ret void
}