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

gnatpp: Program error when parsing unbounded array #5

Open
LordAro opened this issue Aug 16, 2019 · 1 comment
Open

gnatpp: Program error when parsing unbounded array #5

LordAro opened this issue Aug 16, 2019 · 1 comment

Comments

@LordAro
Copy link

LordAro commented Aug 16, 2019

The following spec file:

package bitvector is
   type t_bvstorage is array (Natural range <>) of Integer;
end bitvector;

results in:

Unhandled Exception raised
raised PROGRAM_ERROR : <UnconstrainedArrayIndices test.ads:2:31-2:47> encountered
[/home/cpigott/dev/libadalang-tools/bin/gnatpp]
Pp.Actions.Tree_To_Ada_2.Subtree_To_Ada at pp-actions.adb:4447
Pp.Actions.Tree_To_Ada_2.Subtree_To_Ada.Interpret_Template.Do_Subtree at pp-actions.adb:3184
Pp.Actions.Tree_To_Ada_2.Subtree_To_Ada.Interpret_Template at pp-actions.adb:3300
Pp.Actions.Tree_To_Ada_2.Subtree_To_Ada.Do_Others at pp-actions.adb:4034
Pp.Actions.Tree_To_Ada_2.Subtree_To_Ada at pp-actions.adb:4580
Pp.Actions.Tree_To_Ada_2.Subtree_To_Ada.Interpret_Template.Do_Subtree at pp-actions.adb:3184
Pp.Actions.Tree_To_Ada_2.Subtree_To_Ada.Interpret_Template at pp-actions.adb:3300
Pp.Actions.Tree_To_Ada_2.Subtree_To_Ada.Interpret_Alt_Template at pp-actions.adb:2722
Pp.Actions.Tree_To_Ada_2.Subtree_To_Ada.Do_Type_Decl at pp-actions.adb:4308
Pp.Actions.Tree_To_Ada_2.Subtree_To_Ada at pp-actions.adb:4523
Pp.Actions.Tree_To_Ada_2.Subtree_To_Ada.Subtrees_To_Ada at pp-actions.adb:3054
Pp.Actions.Tree_To_Ada_2.Subtree_To_Ada.Interpret_Template.Do_Opt_Subtree_Or_List at pp-actions.adb:3160
Pp.Actions.Tree_To_Ada_2.Subtree_To_Ada.Interpret_Template.Do_Subtree at pp-actions.adb:3188
Pp.Actions.Tree_To_Ada_2.Subtree_To_Ada.Interpret_Template at pp-actions.adb:3300
Pp.Actions.Tree_To_Ada_2.Subtree_To_Ada.Do_Others at pp-actions.adb:4034
Pp.Actions.Tree_To_Ada_2.Subtree_To_Ada at pp-actions.adb:4580
Pp.Actions.Tree_To_Ada_2.Subtree_To_Ada.Interpret_Template.Do_Subtree at pp-actions.adb:3184
Pp.Actions.Tree_To_Ada_2.Subtree_To_Ada.Interpret_Template at pp-actions.adb:3300
Pp.Actions.Tree_To_Ada_2.Subtree_To_Ada.Do_Others at pp-actions.adb:4034
Pp.Actions.Tree_To_Ada_2.Subtree_To_Ada at pp-actions.adb:4580
Pp.Actions.Tree_To_Ada_2.Subtree_To_Ada.Interpret_Template.Do_Subtree at pp-actions.adb:3184
Pp.Actions.Tree_To_Ada_2.Subtree_To_Ada.Interpret_Template at pp-actions.adb:3300
Pp.Actions.Tree_To_Ada_2.Subtree_To_Ada.Do_Others at pp-actions.adb:4034
Pp.Actions.Tree_To_Ada_2.Subtree_To_Ada at pp-actions.adb:4580
Pp.Actions.Tree_To_Ada_2.Subtree_To_Ada.Do_Compilation_Unit at pp-actions.adb:3513
Pp.Actions.Tree_To_Ada_2.Subtree_To_Ada at pp-actions.adb:4451
Pp.Actions.Tree_To_Ada_2.Convert_Tree_To_Ada at pp-actions.adb:4599
Pp.Actions.Tree_To_Ada_2 at pp-actions.adb:4644
Pp.Actions.Format_Vector.Tree_To_Ada at pp-actions.adb:4710
Pp.Actions.Format_Vector at pp-actions.adb:4880
Pp.Actions.Per_File_Action at pp-actions.adb:5200
Utils.Tools.Process_File at utils-tools.adb:90
Utils.Drivers.Driver.Process_Files at utils-drivers.adb:121
Utils.Drivers.Driver at utils-drivers.adb:220
Pp.Main at pp-main.adb:20
Main at b__pp-main.adb:1706
[/lib/x86_64-linux-gnu/libc.so.6]
0x7fad73684b95
[/home/cpigott/dev/libadalang-tools/bin/gnatpp]
0x407d78 _start at ???
0xfffffffffffffffe

Update: generic is not required

@LordAro LordAro changed the title gnatpp: Program error when parsing generic with unbounded array gnatpp: Program error when parsing unbounded array Aug 16, 2019
@Fabien-Chouteau
Copy link
Member

Sorry this was closed by mistake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants