This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Ada] Fix 32/64bit mistake on SYSTEM_INFO component in s-win32
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: Iain Sandoe <idsandoe at googlemail dot com>
- Cc: Pierre-Marie de Rodat <derodat at adacore dot com>, gcc-patches at gcc dot gnu dot org, Olivier Hainque <hainque at adacore dot com>
- Date: Thu, 19 Sep 2019 16:51:00 +0200
- Subject: Re: [Ada] Fix 32/64bit mistake on SYSTEM_INFO component in s-win32
- References: <20190918083944.GA145030@adacore.com> <B2DAAF6F-147D-46CC-AF54-8BCFB71FE25C@googlemail.com>
Hi Iain,
>> On 18 Sep 2019, at 09:39, Pierre-Marie de Rodat <derodat@adacore.com> wrote:
>>
>
>> gcc/testsuite/
>>
>> * gnat.dg/system_info1.adb: New testcase.<patch.diff>
>
> This new test fails everywhere on Darwin, which doesn’t have an implementation for
> System.Task_Info.Number_Of_Processors
>
> Given
> "pragma Obsolescent (Task_Info, "use System.Multiprocessors and CPU aspect”);”
>
> is it worth me trying to implement the Task_Info stuff?
I'm seeing the same on Solaris (will be every non-Linux/MinGW target).
I've implemented Number_Of_Processors using
sysconf(__SC_NPROCESSORS_ONLN), which is also available on Darwin. Will
submit the patch tomorrow once testing has finished...
> or should I just skip this test on Darwin?
>
> (if the latter, then I would plan to apply the patch below)
[...]
> diff --git a/gcc/testsuite/gnat.dg/system_info1.adb b/gcc/testsuite/gnat.dg/system_info1.adb
> index 493a18e907..c1523a277f 100644
> --- a/gcc/testsuite/gnat.dg/system_info1.adb
> +++ b/gcc/testsuite/gnat.dg/system_info1.adb
> @@ -1,4 +1,4 @@
> --- { dg-do run }
> +-- { dg-do run { target { ! *-*-darwin* } } }
Given that the test cannot compile on anything but *-*-linux* and
*-*-mingw*, I'd rather restrict the test to those two (or more targets
that decide to implement the missing interface).
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University