comp.lang.ada
 help / color / mirror / Atom feed
From: Per Sandberg <per.s.sandberg@bahnhof.se>
Subject: Re: Yet another gnat bug
Date: Fri, 1 Feb 2019 22:22:33 +0100
Date: 2019-02-01T22:22:33+01:00	[thread overview]
Message-ID: <uM25E.171780$592.61943@fx16.am4> (raw)
In-Reply-To: <987a6ff2-32d0-45a0-b90a-be9fbf1ff47b@googlegroups.com>

Tried your repository with the branch you suggested but i failed with 
the following log:
-----------------------------------------------------------
[wann]$ make
gprbuild -p -j0 -P wann.gpr
wann.gpr:5:32: "../../libs/ada_common/src" is not a valid directory
gprbuild: "wann.gpr" processing failed
-----------------------------------------------------------
So please provide a "working" reproducible.
/P

On 2/1/19 3:51 PM, George Shapovalov wrote:
> This will probably sound more like venting frustration. Sorry if so. But how does anybody get anything done?
> gnat is *the major* Ada compiler and pretty much the only one implementing the standard in full. Yet I cannot seem to get it working past really small size in any project. As soon as I try to get any basic type composition done (only 3-4 inheritance levels, with, perhaps double interface overlay), I get that dreaded gnat bug message.. This is at least the 3rd one just within past week or two..
> Specifically this:
> https://github.com/gerr135/wann/tree/gnat_bug01
> (the bug triggering code is in a separate branch pointed to by that link).
> 
> This is still early in design phase and far from being functional in any way, so I don't really expect much comments on the code itself (thus that "venting frustration" comment above). But the pattern that seems to universally trigger these gnat bugs is something along these lines:
> 
> type Base_Interface is interface;
> ..
> 
> type Derived1_Interface is new Base_Interface and ..;
> ..
> perhaps few more layers here..
> 
> then
> type Base_impl1 is new Base_Interface with private;
> ..
> type Derived1 is new Base_impl1 and Derived1_Interface with private..
> 
> basically trying to stitch together functional interface hierarchy (containing algorithmic stuff) and data storage type hierarchy. Somehow gnat very often just cannot handle this type of design :(.
> (and yes, I am avoiding having to lay generics on top of other generics like Dmitry suggests - keeps design and compilation times sane, but apparently overloads gnat capacity to deal with abstraction).
> 
> So, I guess my question would be - how people deal with such situations (combining algorithmic and data representation type hierarchies) in their experience? Or, whether too many child modules makes any difference? I seem to have noticed that the more hierarchical my packages are (but this one is only like 3rd level child!) the more often I trigger that gnat bug message..
> (but then keeping the code in one huge module is really messy too!)
> 
> And yeah, the specific message here is:
> gprbuild -P wann.gpr
> Compile
>     [Ada]          run_customnn.adb
> +===========================GNAT BUG DETECTED==============================+
> | Community 2018 (20180524-73) (x86_64-pc-linux-gnu) GCC error:            |
> | in gnat_to_gnu_entity, at ada/gcc-interface/decl.c:429                   |
> | Error detected at wann-nets-vectors.ads:106:5 [run_customnn.adb:23:5]    |
> | Please submit a bug report by email to report@adacore.com.               |
> | GAP members can alternatively use GNAT Tracker:                          |
> | http://www.adacore.com/ section 'send a report'.                         |
> | See gnatinfo.txt for full info on procedure for submitting bugs.         |
> | Use a subject line meaningful to you and us to track the bug.            |
> | Include the entire contents of this bug box in the report.               |
> | Include the exact command that you entered.                              |
> | Also include sources listed below.                                       |
> | Use plain ASCII or MIME attachment(s).                                   |
> +==========================================================================+
> 
> and the "please include" list of files lists pretty much all of them in the src dir.
> 
> But as I said, this is rather a pattern I observe, not just one-off situation..
> This is with the latest FSF gnat compiler (2018 release based on gcc-7.3.1 backend, Gentoo Linux, relatively fresh everything else).
> 
> Sigh, I guess another report to file with AdaCore..
> Sorry for disturbance here..
> 


  parent reply	other threads:[~2019-02-01 21:22 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-01 14:51 Yet another gnat bug George Shapovalov
2019-02-01 18:47 ` Dmitry A. Kazakov
2019-02-01 21:32   ` George Shapovalov
2019-02-01 20:41 ` Simon Wright
2019-02-01 21:26   ` George Shapovalov
2019-02-01 23:17     ` Simon Wright
2019-02-02  7:16       ` George Shapovalov
2019-02-02  2:00     ` Jere
2019-02-02  7:04       ` George Shapovalov
2019-02-01 21:22 ` Per Sandberg [this message]
2019-02-01 21:34   ` George Shapovalov
2019-02-01 21:36     ` George Shapovalov
2019-02-02  7:13       ` Per Sandberg
2019-02-02 19:05         ` George Shapovalov
2019-02-02 21:37           ` Per Sandberg
2019-02-04 12:28             ` George Shapovalov
2019-02-04 15:30               ` joakimds
2019-02-04 16:11               ` Simon Wright
2019-02-05 19:16                 ` George Shapovalov
2019-02-05 20:37                   ` Simon Wright
2019-02-06 10:53                     ` George Shapovalov
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox