brintos

brintos / llvm-project-archived public Read only

0
0
Text · 737 B · b3dc248 Raw
53 lines · cpp
1// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -o - %s2// RUN: %clang_cc1 -triple i386-apple-darwin -emit-llvm -o - %s3 4// PR54635extern "C" int printf(...);6 7struct S {8  double filler;9};10 11struct Foo {12        Foo(void) : bar_(), dbar_(), sbar_() { 13	  for (int i = 0; i < 5; i++) {14	    printf("bar_[%d] = %d\n", i, bar_[i]);15	    printf("dbar_[%d] = %f\n", i, dbar_[i]);16	    printf("sbar_[%d].filler = %f\n", i, sbar_[i].filler);17	  }18        } 19 20        int bar_[5];21        double dbar_[5];22        S sbar_[5];23};24 25void test1(void) {26        Foo a;27}28 29// PR706330 31 32struct Unit33{34  Unit() {}35  Unit(const Unit& v)  {}36};37 38 39struct Stuff40{41  Unit leafPos[1];42};43 44 45int main()46{47  48  Stuff a;49  Stuff b = a;50  51  return 0;52}53