You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code generation for enumeration types with the aspect Always_Valid => True generates invalid code if an object of such a type is used in the global context.
If the following patch is applied:
diff --git a/tests/integration/session_comprehension_on_sequence/test.rflx b/tests/integration/session_comprehension_on_sequence/test.rflx
index 7fe8739c..4cfc60d3 100644
--- a/tests/integration/session_comprehension_on_sequence/test.rflx
+++ b/tests/integration/session_comprehension_on_sequence/test.rflx
@@ -11,6 +11,7 @@ package Test is
Options : Universal::Options; -- §S-D-V-T-MS, §S-D-V-E-N
Message_1 : Universal::Message; -- §S-S-D-V-T-M, §S-S-D-V-E-N
Message_2 : Universal::Message; -- §S-S-D-V-T-M, §S-S-D-V-E-N
+ First_Option_Type : Universal::Option_Type;
begin
state Start is
begin
@@ -30,6 +31,7 @@ package Test is
Option_Types : Universal::Option_Types; -- §S-S-D-V-T-SS, <C2><A7>S-S-D-V-E-N
Message_Options : Universal::Options; -- §S-S-D-V-T-MS, <C2><A7>S-S-D-V-E-N
begin
+ First_Option_Type := Universal::OT_Data;
-- §S-S-A-A-LC, §S-E-LC-V, §S-E-LC-SMS, §S-E-LC-TSS, §S-E-LC-CS, §S-E-LC-A, §S-E-S-V
Option_Types := [for E in Options if E.Option_Type = Universal::OT_Data => E.Option_Type];
-- Test that target sequence is reset by assignment
The code generation for enumeration types with the aspect
Always_Valid => True
generates invalid code if an object of such a type is used in the global context.If the following patch is applied:
This will make the following test fail:
The reason is that the default initializer is generated the same way as for regular enums
but the Ada type definition is a variant record. In this case no default initializer should be generated.
The text was updated successfully, but these errors were encountered: