diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/gupc/upc-elemsizeof-func-type.upc')
-rw-r--r-- | gcc/testsuite/gcc.dg/gupc/upc-elemsizeof-func-type.upc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/gupc/upc-elemsizeof-func-type.upc b/gcc/testsuite/gcc.dg/gupc/upc-elemsizeof-func-type.upc new file mode 100644 index 00000000000..681af337347 --- /dev/null +++ b/gcc/testsuite/gcc.dg/gupc/upc-elemsizeof-func-type.upc @@ -0,0 +1,20 @@ +/* UPC operator applied to a function type. + { dg-do compile } + { dg-options "-fupc-threads=2" } */ + +typedef __SIZE_TYPE__ size_t; +/* The base address of the UPC shared section */ +extern char __upc_shared_start[1]; + + + + +void func(void) {} + +size_t s; + +int main() +{ + s = upc_elemsizeof (func); /* { dg-error "UPC operator upc_elemsizeof applied to a function type" } */ + return 0; +} |