brintos

brintos / llvm-project-archived public Read only

0
0
Text · 583 B · 8842093 Raw
17 lines · c
1// RUN: %clang_cc1 %s -no-enable-noundef-analysis -triple i686-apple-darwin -emit-llvm -o - | FileCheck %s2// Every printf has 'i32 0' for the GEP of the string; no point counting those.3typedef unsigned int Foo __attribute__((aligned(32)));4typedef union{Foo:0;}a;5typedef union{int x; Foo:0;}b;6extern int printf(const char*, ...);7int main(void) {8  // CHECK: @.str, i32 09  printf("%ld\n", sizeof(a));10  // CHECK: @.str, i32 111  printf("%ld\n", __alignof__(a));12  // CHECK: @.str, i32 413  printf("%ld\n", sizeof(b));14  // CHECK: @.str, i32 415  printf("%ld\n", __alignof__(b));16}17