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
As it works right now, the range bounds handling is working properly if they reduce to a clean integer constant expression, like the following:
type Int_Small isrange -8 .. 8;
If the bounds are more elaborate expressions involving attributes, like this example:
type Range_Type range (Index + 1) .. Range_Type'Last;
Then gnat2goto is failing to process that node because of checks in gnat2goto_itypes.adb, function Do_Itype_Integer_Subtype that ensure that lower bound and upper bounds are constant exprs.
The text was updated successfully, but these errors were encountered:
@NlightNFotis - My Ada knowledge is probably lacking here... but is that failing example actually valid Ada? It almost looks like it's a circular definition that attempts to defined the upper bound of a type, as the value of it's upper bound....
@chrisr-diffblue As it stands, the second code example shouldn't compile (it's not valid Ada). It's more of an example. The actual code listing that produces a crash is similar but it has the attribute of another object there. it looks like this:
for I in Types.Index range (Index + 1) .. Block'Last loop
...
endloop;
with Block being an array parameter to the function containing this statement.
As it works right now, the range bounds handling is working properly if they reduce to a clean integer constant expression, like the following:
If the bounds are more elaborate expressions involving attributes, like this example:
Then
gnat2goto
is failing to process that node because of checks ingnat2goto_itypes.adb
, functionDo_Itype_Integer_Subtype
that ensure that lower bound and upper bounds are constant exprs.The text was updated successfully, but these errors were encountered: