* Compiler stuck on Big_Integer array initialisation
@ 2021-03-14 1:32 Jesper Quorning
2021-03-14 5:56 ` Per Sandberg
2021-04-23 6:37 ` Simon Wright
0 siblings, 2 replies; 4+ messages in thread
From: Jesper Quorning @ 2021-03-14 1:32 UTC (permalink / raw)
Hi All
CE2020 GNAT on macOS gets stuck on the following code:
with Ada.Numerics.Big_Numbers.Big_Integers;
use Ada.Numerics.Big_Numbers.Big_Integers;
procedure Stuck is
A : array (0 .. 9) of Big_Integer := (others => 0); -- Stuck
begin
null;
end Stuck;
$ gnatmake -gnat2020 stuck.adb
The array initialisation (others =>0) is the problem. When I changed it to (0 => 0, others => 0) it compiles.
Is the problem reproducable on Linux and Windows compilers?
/Jesper
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Compiler stuck on Big_Integer array initialisation
2021-03-14 1:32 Compiler stuck on Big_Integer array initialisation Jesper Quorning
@ 2021-03-14 5:56 ` Per Sandberg
2021-03-14 7:59 ` Emmanuel Briot
2021-04-23 6:37 ` Simon Wright
1 sibling, 1 reply; 4+ messages in thread
From: Per Sandberg @ 2021-03-14 5:56 UTC (permalink / raw)
procedure Not_Stuck is
A : array (0 .. 9) of Big_Integer := (others => To_Big_Integer(0));
begin
null;
end Not_Stuck;
On 14/03/2021 02:32, Jesper Quorning wrote:
> procedure Stuck is
> A : array (0 .. 9) of Big_Integer := (others => 0); -- Stuck
> begin
> null;
> end Stuck;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Compiler stuck on Big_Integer array initialisation
2021-03-14 5:56 ` Per Sandberg
@ 2021-03-14 7:59 ` Emmanuel Briot
0 siblings, 0 replies; 4+ messages in thread
From: Emmanuel Briot @ 2021-03-14 7:59 UTC (permalink / raw)
I tested with a recent wavefront of GNAT Pro, and it compiles (and runs) without problem. So no need to report to AdaCore I would think.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Compiler stuck on Big_Integer array initialisation
2021-03-14 1:32 Compiler stuck on Big_Integer array initialisation Jesper Quorning
2021-03-14 5:56 ` Per Sandberg
@ 2021-04-23 6:37 ` Simon Wright
1 sibling, 0 replies; 4+ messages in thread
From: Simon Wright @ 2021-04-23 6:37 UTC (permalink / raw)
Jesper Quorning <jesper.quorning@gmail.com> writes:
> CE2020 GNAT on macOS gets stuck on the following code:
>
> with Ada.Numerics.Big_Numbers.Big_Integers;
> use Ada.Numerics.Big_Numbers.Big_Integers;
> procedure Stuck is
> A : array (0 .. 9) of Big_Integer := (others => 0); -- Stuck
> begin
> null;
> end Stuck;
>
> $ gnatmake -gnat2020 stuck.adb
>
> The array initialisation (others =>0) is the problem. When I changed
> it to (0 => 0, others => 0) it compiles.
FSF GCC 11.0.1 20210331 crashes (internal compiler error).
Both this and GNAT CE 2020 are OK with (others => Big_Integer'(0)).
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-04-23 6:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-14 1:32 Compiler stuck on Big_Integer array initialisation Jesper Quorning
2021-03-14 5:56 ` Per Sandberg
2021-03-14 7:59 ` Emmanuel Briot
2021-04-23 6:37 ` Simon Wright
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox