Skip to content
Snippets Groups Projects
Commit 1fa163c7 authored by benjamin.franksen's avatar benjamin.franksen
Browse files

test: added type_expr.st

This compiler test adds a lot of complicated declarations and type
expressions.
parent 4cc5dd74
No related branches found
No related tags found
No related merge requests found
...@@ -20,6 +20,7 @@ TESTSCRIPTS_HOST += snc_test.t ...@@ -20,6 +20,7 @@ TESTSCRIPTS_HOST += snc_test.t
#TESTSCRIPTS_HOST += build64_test.t #TESTSCRIPTS_HOST += build64_test.t
#TESTSCRIPTS_CROSS += build64_test.t #TESTSCRIPTS_CROSS += build64_test.t
TESTPROD_HOST += type_expr
TESTPROD_HOST += funcdef TESTPROD_HOST += funcdef
PROD_LIBS += seq pv PROD_LIBS += seq pv
......
...@@ -14,6 +14,7 @@ my $success = { ...@@ -14,6 +14,7 @@ my $success = {
subscript => 0, subscript => 0,
sync_not_monitored => 0, sync_not_monitored => 0,
syncq_not_monitored => 0, syncq_not_monitored => 0,
type_expr => 0,
}; };
my $warning = { my $warning = {
......
/*************************************************************************\
Copyright (c) 2013 Helmholtz-Zentrum Berlin f. Materialien
und Energie GmbH, Germany (HZB)
This file is distributed subject to a Software License Agreement found
in the file LICENSE that is included with this distribution.
\*************************************************************************/
program type_exprTest
option +r;
#if 0
void f(
void *p,
void **pp,
void (*pf1)(void),
void (*pf2)(int x,int),
void (*pf3)(int*),
void (*pf4)(int**),
void (*pf5)(double**,int),
void (*pf6)(double**,int(**)[2]),
double **pd,
double **ppd
);
#endif
entry {
long n = 0;
void *p = (void *)n;
void **pp = (void**)n;
void (*pf1)(void) = (void (*)(void))n;
void (*pf2)(int x,int) = (void (*)(int,int))n;
void (*pf3)(int*) = (void (*)(int*))n;
void (*pf4)(int**) = (void (*)(int**))n;
void (*pf5)(double**,int) = (void (*)(double**,int))n;
void (*pf6)(double**,int(**)[2]) = (void (*)(double**,int(**)[2]))n;
double **pd = (double**)(int*)n;
double **ppd = (double**)(int(*)[3])n;
void (*lf)(
void *p,
void **pp,
void (*pf1)(void),
void (*pf2)(int x,int),
void (*pf3)(int*),
void (*pf4)(int**),
void (*pf5)(double**,int),
void (*pf6)(double**,int(**)[2]),
double **pd,
double **ppd
) = (void (*)(
void *p,
void **pp,
void (*pf1)(void),
void (*pf2)(int x,int),
void (*pf3)(int*),
void (*pf4)(int**),
void (*pf5)(double**,int),
void (*pf6)(double**,int(**)[2]),
double **pd,
double **ppd
))n;
lf(p,pp,pf1,pf2,pf3,pf4,pf5,pf6,pd,ppd);
}
#include "../simple.st"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment