comp.lang.ada
 help / color / mirror / Atom feed
* spurious error with GNAT 13.2.0 on Intel macOS 17.2
@ 2023-12-14 23:49 moi
  2023-12-15 15:23 ` Simon Wright
  0 siblings, 1 reply; 3+ messages in thread
From: moi @ 2023-12-14 23:49 UTC (permalink / raw)


The 17.2 update is accompanied by updated Command Line Tools,
so, having made a copy of the current CLTs, I let it update.


With GNAT 13.2.0 on Intel macOS 17.2 this happens:

/Users/wf/KDF9/emulation/Testing: chmod 444 ST0

On compiling and running the minimum test case:


with Ada.Direct_IO;
with Ada.IO_Exceptions;
procedure failure is
     package my_IO is new Ada.Direct_IO(Integer);
     use my_IO;
     my_file : File_Type;
begin
Open(my_file, Inout_File, "ST0");
exception
    when Ada.IO_Exceptions.Use_Error =>
        raise program_error with "Open failed to get RW access";
end failure;


I get:

A. with  ”-largs -Wl,-ld_classic” in the linker parameters:

/Users/wf/KDF9/emulation/Testing: failure
raised PROGRAM_ERROR : Open failed to get RW access

This is what should happen.

B. recompiled and relinked without ”-largs -Wl,-ld_classic”:

/Users/wf/KDF9/emulation/Testing: failure
raised CONSTRAINT_ERROR : erroneous memory access

OOPS!

Strangely, this is now the ONLY one out of dozens of regression tests
that fails in this software configuration.
Previously, they all failed at the link stage.

-- 
Bill F.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: spurious error with GNAT 13.2.0 on Intel macOS 17.2
  2023-12-14 23:49 spurious error with GNAT 13.2.0 on Intel macOS 17.2 moi
@ 2023-12-15 15:23 ` Simon Wright
  2023-12-16  0:03   ` moi
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Wright @ 2023-12-15 15:23 UTC (permalink / raw)


moi <findlaybill@blueyonder.co.uk> writes:

> The 17.2 update is accompanied by updated Command Line Tools,
> so, having made a copy of the current CLTs, I let it update.

I think you mean 14.2!

GCC 13/CLT 15.* still has issues with exceptions, eg this unresolved
issue: https://github.com/iains/gcc-13-branch/issues/10, and the
ld-classic dance fixes them as far as I can tell.

I'm working with this fix: https://github.com/simonjwright/xcode_15_fix
which is included in my GCC 13.2.0 build:
https://github.com/simonjwright/distributing-gcc/releases/tag/gcc-13.2.0-aarch64

> I get:
>
> A. with  ”-largs -Wl,-ld_classic” in the linker parameters:
>
> /Users/wf/KDF9/emulation/Testing: failure
> raised PROGRAM_ERROR : Open failed to get RW access
>
> This is what should happen.
>
> B. recompiled and relinked without ”-largs -Wl,-ld_classic”:
>
> /Users/wf/KDF9/emulation/Testing: failure
> raised CONSTRAINT_ERROR : erroneous memory access
>
> OOPS!
>
> Strangely, this is now the ONLY one out of dozens of regression tests
> that fails in this software configuration.
> Previously, they all failed at the link stage.

Yes, the 15.1 betas fixed the linking problem. I've no idea why some
exceptions don't get caught/raise memory access errors. I do think that
the aarch64 GCC 14 has fixed the problem.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: spurious error with GNAT 13.2.0 on Intel macOS 17.2
  2023-12-15 15:23 ` Simon Wright
@ 2023-12-16  0:03   ` moi
  0 siblings, 0 replies; 3+ messages in thread
From: moi @ 2023-12-16  0:03 UTC (permalink / raw)


On 15/12/2023 15:23, Simon Wright wrote:
> moi <findlaybill@blueyonder.co.uk> writes:
> 
>> The 17.2 update is accompanied by updated Command Line Tools,
>> so, having made a copy of the current CLTs, I let it update.
> 
> I think you mean 14.2!

Yes indeed, confusing it with iOS!

> 
> GCC 13/CLT 15.* still has issues with exceptions, eg this unresolved
> issue: https://github.com/iains/gcc-13-branch/issues/10, and the
> ld-classic dance fixes them as far as I can tell.

I have no problem when dancing classically.

> 
> I'm working with this fix: https://github.com/simonjwright/xcode_15_fix
> which is included in my GCC 13.2.0 build:
> https://github.com/simonjwright/distributing-gcc/releases/tag/gcc-13.2.0-aarch64
> ...
>>
>> Strangely, this is now the ONLY one out of dozens of regression tests
>> that fails in this software configuration.
>> Previously, they all failed at the link stage.
> 
> Yes, the 15.1 betas fixed the linking problem. I've no idea why some
> exceptions don't get caught/raise memory access errors. I do think that
> the aarch64 GCC 14 has fixed the problem.

Good to know.

Thanks again, Simon.

-- 
Bill F.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-12-16  0:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-14 23:49 spurious error with GNAT 13.2.0 on Intel macOS 17.2 moi
2023-12-15 15:23 ` Simon Wright
2023-12-16  0:03   ` moi

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