Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Session without IO states yields uncompilable code #884

Closed
senier opened this issue Dec 20, 2021 · 0 comments · Fixed by #886
Closed

Session without IO states yields uncompilable code #884

senier opened this issue Dec 20, 2021 · 0 comments · Fixed by #886
Assignees
Labels
bug generator Related to generator package (SPARK code generation)

Comments

@senier
Copy link
Member

senier commented Dec 20, 2021

package Test is

   type T1 is mod 2 ** 8;
   type T2 is
      message
         F : T1;
      end message;
   generic
   session S with
      Initial => Start,
      Final   => Done
   is
   begin
      state Start is
         M : T2;
      begin
         M := T2'(F => 42);
      transition
         goto Done
      exception
         goto Done
      end Start;

      state Done is null state;
   end S;
end Test;
$ gprbuild 
using project file /opt/GNAT-Community-2021/share/gpr/_default.gpr
Compile
   [Ada]          rflx-test-s.adb
rflx-test-s.adb:83:22: (style) space not allowed
rflx-test-s.adb:83:22: error: missing operand
gprbuild: *** compilation phase failed
   function In_IO_State return Boolean is 
     (P_Next_State in );                                                                                                
@senier senier added bug generator Related to generator package (SPARK code generation) labels Dec 20, 2021
@kanigsson kanigsson self-assigned this Dec 21, 2021
kanigsson added a commit that referenced this issue Dec 21, 2021
- Fix noncompilable code for session without allocation points
- Fix noncompilable code for session without IO states

Fixes #883
Fixes #884
kanigsson added a commit that referenced this issue Dec 21, 2021
- Fix noncompilable code for session without allocation points
- Fix noncompilable code for session without IO states

Fixes #883
Fixes #884
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug generator Related to generator package (SPARK code generation)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants