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 with only null state yields uncompilable code #883

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

Session with only null state yields uncompilable code #883

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
   generic
   session S with
      Initial => Done,
      Final   => Done
   is
   begin
      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_allocator.adb
rflx-test-s_allocator.adb:22:03: error: statement expected
gprbuild: *** compilation phase failed
package body RFLX.Test.S_Allocator with                                                                                 
  SPARK_Mode                                                                                                            
is                                                                                                                                                          
                                                                                                                        
   procedure Initialize with                                                                                            
     SPARK_Mode =>                                                                                                      
       Off                                                                                                              
   is                                                                                                                   
   begin                                                                                                                
                                                                                                                        
   end Initialize;                                                                                                      
                                                                                                                        
end RFLX.Test.S_Allocator;
@senier senier added bug generator Related to generator package (SPARK code generation) labels Dec 20, 2021
@kanigsson kanigsson self-assigned this Dec 20, 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