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

Invalid code generation for message size calculation #500

Closed
treiher opened this issue Nov 24, 2020 · 0 comments · Fixed by #515
Closed

Invalid code generation for message size calculation #500

treiher opened this issue Nov 24, 2020 · 0 comments · Fixed by #515
Assignees
Labels
bug generator Related to generator package (SPARK code generation)

Comments

@treiher
Copy link
Collaborator

treiher commented Nov 24, 2020

package Test is

   type T is mod 2**16;

   type Message is
      message
         A : T;
         B : T;
         C : Opaque
            with Size => A * 8
            if Message'Size = A * 8 + (B'Last - A'First + 1);
      end message;

end Test;
rflx-test-generic_message.adb:64:96: invalid operand types for operator "+"
rflx-test-generic_message.adb:64:96: left operand has type "U64" defined at rflx-rflx_arithmetic.ads:15
rflx-test-generic_message.adb:64:96: right operand has type "Bit_Length" defined at rflx-rflx_generic_types.ads:21, instance at rflx-test-generic_message.ads:13
rflx-test-generic_message.adb:75:89: invalid operand types for operator "+"
rflx-test-generic_message.adb:75:89: left operand has type "U64" defined at rflx-rflx_arithmetic.ads:15
rflx-test-generic_message.adb:75:89: right operand has type "Bit_Index" defined at rflx-rflx_generic_types.ads:43, instance at rflx-test-generic_message.ads:13
rflx-test-generic_message.adb:118:102: invalid operand types for operator "+"
rflx-test-generic_message.adb:118:102: left operand has type "U64" defined at rflx-rflx_arithmetic.ads:15
rflx-test-generic_message.adb:118:102: right operand has type "Bit_Length" defined at rflx-rflx_generic_types.ads:21, instance at rflx-test-generic_message.ads:13
rflx-test-generic_message.adb:140:93: invalid operand types for operator "+"
rflx-test-generic_message.adb:140:93: left operand has type "U64" defined at rflx-rflx_arithmetic.ads:15
rflx-test-generic_message.adb:140:93: right operand has type "Bit_Length" defined at rflx-rflx_generic_types.ads:21, instance at rflx-test-generic_message.ads:13
rflx-test-generic_message.adb:331:145: invalid operand types for operator "+"
rflx-test-generic_message.adb:331:145: left operand has type "U64" defined at rflx-rflx_arithmetic.ads:15
rflx-test-generic_message.adb:331:145: right operand has type "Bit_Length" defined at rflx-rflx_generic_types.ads:21, instance at rflx-test-generic_message.ads:13
rflx-test-generic_message.adb:382:91: invalid operand types for operator "+"
rflx-test-generic_message.adb:382:91: left operand has type "U64" defined at rflx-rflx_arithmetic.ads:15
rflx-test-generic_message.adb:382:91: right operand has type "Bit_Length" defined at rflx-rflx_generic_types.ads:21, instance at rflx-test-generic_message.ads:13
rflx-test-generic_message.adb:388:91: invalid operand types for operator "+"
rflx-test-generic_message.adb:388:91: left operand has type "U64" defined at rflx-rflx_arithmetic.ads:15
rflx-test-generic_message.adb:388:91: right operand has type "Bit_Length" defined at rflx-rflx_generic_types.ads:21, instance at rflx-test-generic_message.ads:13
rflx-test-generic_message.adb:526:136: invalid operand types for operator "+"
rflx-test-generic_message.adb:526:136: left operand has type "U64" defined at rflx-rflx_arithmetic.ads:15
rflx-test-generic_message.adb:526:136: right operand has type "Bit_Length" defined at rflx-rflx_generic_types.ads:21, instance at rflx-test-generic_message.ads:13
rflx-test-generic_message.ads:254:71: invalid operand types for operator "+"
rflx-test-generic_message.ads:254:71: left operand has type "U64" defined at rflx-rflx_arithmetic.ads:15
rflx-test-generic_message.ads:254:71: right operand has type "Bit_Index" defined at rflx-rflx_generic_types.ads:43, instance at line 13
rflx-test-generic_message.ads:428:103: invalid operand types for operator "+"
rflx-test-generic_message.ads:428:103: left operand has type "U64" defined at rflx-rflx_arithmetic.ads:15
rflx-test-generic_message.ads:428:103: right operand has type "Bit_Length" defined at rflx-rflx_generic_types.ads:21, instance at line 13
rflx-test-generic_message.ads:451:118: invalid operand types for operator "+"
rflx-test-generic_message.ads:451:118: left operand has type "U64" defined at rflx-rflx_arithmetic.ads:15
rflx-test-generic_message.ads:451:118: right operand has type "Bit_Length" defined at rflx-rflx_generic_types.ads:21, instance at line 13
@treiher treiher added bug generator Related to generator package (SPARK code generation) labels Nov 24, 2020
@treiher treiher added this to To do in RecordFlux 0.5 via automation Nov 24, 2020
@treiher treiher moved this from To do to In progress in RecordFlux 0.5 Nov 30, 2020
@treiher treiher self-assigned this Nov 30, 2020
@treiher treiher moved this from In progress to Done in RecordFlux 0.5 Dec 1, 2020
treiher added a commit that referenced this issue Dec 1, 2020
treiher added a commit that referenced this issue Dec 1, 2020
treiher added a commit that referenced this issue Dec 1, 2020
treiher added a commit that referenced this issue Dec 1, 2020
treiher added a commit that referenced this issue Dec 3, 2020
RecordFlux 0.5 automation moved this from Done to Merged Dec 3, 2020
treiher added a commit that referenced this issue Dec 3, 2020
treiher added a commit that referenced this issue Dec 3, 2020
treiher added a commit that referenced this issue Dec 3, 2020
@treiher treiher mentioned this issue Aug 4, 2021
9 tasks
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
No open projects
RecordFlux 0.5
  
Merged
Development

Successfully merging a pull request may close this issue.

1 participant