File: 2844-6.ispc

package info (click to toggle)
ispc 1.28.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 97,620 kB
  • sloc: cpp: 77,067; python: 8,303; yacc: 3,337; lex: 1,126; ansic: 631; sh: 475; makefile: 17
file content (16 lines) | stat: -rw-r--r-- 469 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Test for incomplete types regarding unsized arrays.

// RUN: not %{ispc} --target=host --nowrap --nostdlib %s -o %t.o 2>&1 | FileCheck %s

// CHECK: Error: incomplete type 'S1'
struct S1 { int a[]; };

// CHECK-NOT: Error: incomplete type 'S2'
struct S2 { int y; int x[]; };

// CHECK-NOT: Error: parameter 'b' has incomplete type
int foo(int b[]);
// CHECK-NOT: Error: parameter 'c' has incomplete type
int boo(int c[]) { return c[0]; }

// CHECK-NOT: FATAL ERROR: