xref: /llvm-project/clang/test/Sema/struct-cast.c (revision cc55af777a19b69f466875683655810f5d485386)
1 // RUN: %clang_cc1 -fsyntax-only %s -verify
2 // RUN: %clang_cc1 -fsyntax-only %s -fexperimental-new-constant-interpreter -verify
3 // expected-no-diagnostics
4 
5 struct S {
6  int one;
7  int two;
8 };
9 
10 struct S const foo(void);
11 
12 
13 struct S tmp;
14 
priv_sock_init(void)15 void priv_sock_init(void) {
16   tmp = (struct S)foo();
17 }
18