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

added compiler test for member access

parent 124e6793
No related branches found
No related tags found
No related merge requests found
program memberTest
%%struct struct_t { int i; struct { double d; } s; };
%%union union_t { int i; struct struct_t *p; };
struct struct_t s;
union union_t u;
ss simple {
struct struct_t *ps = &s;
union union_t *pu = &u;
state simple {
when () {
if (s.i == 1)
s.i++;
if (s.s.d == 0.1)
s.s.d /= 3.0;
if (ps->i == 1)
ps->i++;
if (ps->s.d == 0.1)
ps->s.d /= 3.0;
if (pu->i == 13)
pu->p->i = pu->i;
if (pu->p->s.d == 13.0)
pu->p->s.d *= 3;
} exit
}
}
...@@ -9,6 +9,7 @@ my $success = { ...@@ -9,6 +9,7 @@ my $success = {
exOpt_DuplOpt => 0, exOpt_DuplOpt => 0,
foreignTypes => 0, foreignTypes => 0,
include_windows_h => 0, include_windows_h => 0,
member => 0,
namingConflict => 0, namingConflict => 0,
nesting_depth => 0, nesting_depth => 0,
sync_not_monitored => 0, sync_not_monitored => 0,
......
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