brintos

brintos / llvm-project-archived public Read only

0
0
Text · 461 B · 6448aac Raw
26 lines · c
1// RUN: %clang_cc1 -triple i386-unknown-unknown -O3 -emit-llvm %s -o - | FileCheck %s2// CHECK: ret i32 93 4struct s0 {5  int *var;6  int addend;7};8 9static void f0(struct s0 *p) {10  *p->var += p->addend;11}12 13int f1(void) {14  int var = 0;15  16  {17    struct s0 x __attribute__((cleanup(f0))) = { &var, 2 };  18    struct s0 y __attribute__((cleanup(f0))) = { &var, 3 };19    {20      struct s0 y __attribute__((cleanup(f0))) = { &var, 4 };21    }22  }23 24  return var;25}26