gnatstub fails to generate any Ada code

Bug #1738133 reported by Jean-Christophe Dubois
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
asis (Ubuntu)
New
Undecided
Unassigned

Bug Description

I am trying to use gnatstub on my ubuntu 17.10 system.

I have installed the asys-programs 2017-2 through the package manager.

I am trying to generate the stub function (adb file) from the following file (tiny.ads).

package tiny is

        procedure simple_procedure;
        function simple_function return boolean;

end tiny;

When I run gnatstub, I get the following output.

$ gnatstub tiny.ads

+===========================ASIS BUG DETECTED==============================+
| ASIS 2.0.R for GNAT 7.2.0 CONSTRAINT_ERROR a4g-gnat_int.adb:247 range check failed|
| when processing A4G.Contt.SD.Read_and_Check_New (tree file /home/jcd/Projects/hypervisor/moth/tiny.adt)|
| Please submit a bug report; see http://gcc.gnu.org/bugs.html. |
| Use a subject line meaningful to you and us to track the bug. |
| Include the entire contents of this bug box and the ASIS debug info |
| in the report. |
| Include the exact list of the parameters of the ASIS queries |
| Asis.Implementation.Initialize and Asis.Ada_Environments.Associate |
| from the ASIS application for which the bug is detected |
| Also include sources listed below in gnatchop format |
| (concatenated together with no headers between files). |
| NOTE: ASIS bugs may be submitted to <email address hidden> |
+==========================================================================+

Please include these source files with error report
Note that list may not be accurate in some cases,
so please double check that the problem can still
be reproduced with the set of files listed.

$

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: asis-programs 2017-2
ProcVersionSignature: Ubuntu 4.13.0-19.22-generic 4.13.13
Uname: Linux 4.13.0-19-generic x86_64
ApportVersion: 2.20.7-0ubuntu3.6
Architecture: amd64
CurrentDesktop: XFCE
Date: Thu Dec 14 06:45:58 2017
InstallationDate: Installed on 2016-04-23 (599 days ago)
InstallationMedia: Xubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
SourcePackage: asis
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Jean-Christophe Dubois (jcd) wrote :
Revision history for this message
Jean-Christophe Dubois (jcd) wrote :

when I contacted Adacore abot this issue, I got the following answer:

  The way you are using gnatstub is correct, and I can confirm that it
  works for AdaCore products. But we cannot say anything for the GNAT versions
  built and distributed outside AdaCore.

Somehow the issue seems specific to the binary distributed in the ubuntu package.

Revision history for this message
Jean-Christophe Dubois (jcd) wrote :

For the record, I downloaded the tar.gz version from adacore website (http://mirrors.cdn.adacore.com/art/591c6d80c7a447af2deed1d7) and I don not experiment this problem with it.

Revision history for this message
Nicolas Boulenguez (nicolas-boulenguez) wrote :

This looks like a duplicate of an existing Debian bug.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=810314

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.