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

test: moved declaration error cases to test/compiler

parent 5388f665
No related branches found
No related tags found
No related merge requests found
program efArrayTest
evflag efa[3]; /* error: array of event flags */
#include "simple.st"
program efGlobalTest
ss x {
evflag a;
state y {
evflag b;
when () {
evflag c;
} exit
}
}
program efPointerTest
evflag *efp; /* error: pointer to event flag */
#include "simple.st"
program foreignGlobalTest
ss x {
foreign a;
state y {
foreign b;
when () {
foreign c;
} exit
}
}
program pvNotAssigned
int a;
entry {
pvGet(a);
pvPut(a);
pvAssign(a, "");
pvMonitor(a);
}
ss x {
state y {
entry {
pvAssign(a, "");
pvMonitor(a);
pvGet(a);
pvPut(a);
}
when () {
pvAssign(a, "");
pvMonitor(a);
pvGet(a);
pvPut(a);
} exit
exit {
pvAssign(a, "");
pvMonitor(a);
pvGet(a);
pvPut(a);
}
}
}
exit {
pvAssign(a, "");
pvMonitor(a);
pvGet(a);
pvPut(a);
}
...@@ -23,6 +23,11 @@ my @error = qw( ...@@ -23,6 +23,11 @@ my @error = qw(
syncq_size_out_of_range syncq_size_out_of_range
varinit varinit
varinitOptr varinitOptr
efArray
efPointer
efGlobal
foreignGlobal
pvNotAssigned
); );
if ($host_arch =~ /64/) { if ($host_arch =~ /64/) {
......
...@@ -10,11 +10,6 @@ int *(*(*complicated)[2][3])[1] = 0; ...@@ -10,11 +10,6 @@ int *(*(*complicated)[2][3])[1] = 0;
evflag ef; evflag ef;
#if 0
evflag efa[3]; /* error: array of event flags */
evflag *efp; /* error: pointer to event flag */
#endif
/* struct member access */ /* struct member access */
%%struct r { int x; } rv; %%struct r { int x; } rv;
...@@ -53,10 +48,7 @@ ss one { ...@@ -53,10 +48,7 @@ ss one {
sync c to ef; sync c to ef;
string s = "s"; string s = "s";
assign s; assign s;
/* evflag ef; */ /* error: event flag must be global */
/* foreign z; */ /* error: foreign must be global */
entry { entry {
/* pvPut(a); */ /* error: not assigned */
pvPut(b); pvPut(b);
pvPut(c); pvPut(c);
pvPut(s); pvPut(s);
......
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