[Bug ada/79945] ppc64le Default_Bit_Order in Ada

2017-03-08 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79945

Eric Botcazou  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |6.4

--- Comment #9 from Eric Botcazou  ---
.

[Bug ada/79945] ppc64le Default_Bit_Order in Ada

2017-03-08 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79945

--- Comment #7 from Eric Botcazou  ---
Author: ebotcazou
Date: Wed Mar  8 09:08:54 2017
New Revision: 245970

URL: https://gcc.gnu.org/viewcvs?rev=245970=gcc=rev
Log:
PR ada/79945
* system-linux-ppc.ads (Default_Bit_Order): Use Standard's setting.

* system-linux-arm.ads (Default_Bit_Order): Likewise.
* system-linux-mips.ads (Default_Bit_Order): Likewise.
* system-linux-armeb.ads: Delete.
* system-linux-mipsel.ads: Likewise.
* gcc-interface/Makefile.in (MIPS/Linux): Adjust.
(ARM/Linux): Likewise.

Removed:
trunk/gcc/ada/system-linux-armeb.ads
trunk/gcc/ada/system-linux-mipsel.ads
Modified:
trunk/gcc/ada/ChangeLog
trunk/gcc/ada/gcc-interface/Makefile.in
trunk/gcc/ada/system-linux-arm.ads
trunk/gcc/ada/system-linux-mips.ads
trunk/gcc/ada/system-linux-ppc.ads

[Bug ada/79945] ppc64le Default_Bit_Order in Ada

2017-03-08 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79945

--- Comment #8 from Eric Botcazou  ---
Author: ebotcazou
Date: Wed Mar  8 09:09:11 2017
New Revision: 245971

URL: https://gcc.gnu.org/viewcvs?rev=245971=gcc=rev
Log:
PR ada/79945
* system-linux-ppc.ads (Default_Bit_Order): Use Standard's setting.

Modified:
branches/gcc-6-branch/gcc/ada/ChangeLog
branches/gcc-6-branch/gcc/ada/system-linux-ppc.ads

[Bug ada/79945] ppc64le Default_Bit_Order in Ada

2017-03-08 Thread pavel at zhukoff dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79945

--- Comment #6 from Pavel Zhukov  ---
Checked. Standard'Bit_Order is correct. So should be fine. Thank you, Eric.

[Bug ada/79945] ppc64le Default_Bit_Order in Ada

2017-03-07 Thread pavel at zhukoff dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79945

Pavel Zhukov  changed:

   What|Removed |Added

 CC||pavel at zhukoff dot net

--- Comment #5 from Pavel Zhukov  ---
(In reply to Eric Botcazou from comment #1)

> Presumably:
> 
> Index: system-linux-ppc.ads
> ===
> --- system-linux-ppc.ads(revision 245767)
> +++ system-linux-ppc.ads(working copy)
> @@ -89,7 +89,8 @@ package System is
> --  Other System-Dependent Declarations
>  
> type Bit_Order is (High_Order_First, Low_Order_First);
> -   Default_Bit_Order : constant Bit_Order := High_Order_First;
> +   Default_Bit_Order : constant Bit_Order :=
> + Bit_Order'Val (Standard'Default_Bit_Order);
> pragma Warnings (Off, Default_Bit_Order); -- kill constant condition
> warning
>  
> --  Priority-related Declarations (RM D.1)

I'm wondering if it will work and not break ppc and ppc64.
ppc64le is exceptional in ppc family. ppc and ppc64 have high_bit_first 

$ gcc -dumpmachine
ppc64-redhat-linux

$ ./bits 
Default byte order is: HIGH_ORDER_FIRST
Order of record is HIGH_ORDER_FIRST

$ gcc -dumpmachine
ppc64le-redhat-linux
$ ./bits
Default byte order is: HIGH_ORDER_FIRST <== SHOULD BE LOW!
Order of record is LOW_ORDER_FIRST

[Bug ada/79945] ppc64le Default_Bit_Order in Ada

2017-03-07 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79945

Eric Botcazou  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |ebotcazou at gcc dot 
gnu.org

--- Comment #4 from Eric Botcazou  ---
Fixing.

[Bug ada/79945] ppc64le Default_Bit_Order in Ada

2017-03-07 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79945

--- Comment #3 from Eric Botcazou  ---
It's already present in system.ads so it should.

[Bug ada/79945] ppc64le Default_Bit_Order in Ada

2017-03-07 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79945

--- Comment #2 from Jakub Jelinek  ---
If it works, even better.

[Bug ada/79945] ppc64le Default_Bit_Order in Ada

2017-03-07 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79945

Eric Botcazou  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-03-07
 Ever confirmed|0   |1

--- Comment #1 from Eric Botcazou  ---
> Shall we
> cp -a gcc/ada/system-linux-ppc{,le}.ads
> sed -i -e 's/:= High_Order/:= Low_Order/' gcc/ada/system-linux-ppcle.ads
> and tweak gcc/ada/gcc-interface/Makefile.in, something else?

Presumably:

Index: system-linux-ppc.ads
===
--- system-linux-ppc.ads(revision 245767)
+++ system-linux-ppc.ads(working copy)
@@ -89,7 +89,8 @@ package System is
--  Other System-Dependent Declarations

type Bit_Order is (High_Order_First, Low_Order_First);
-   Default_Bit_Order : constant Bit_Order := High_Order_First;
+   Default_Bit_Order : constant Bit_Order :=
+ Bit_Order'Val (Standard'Default_Bit_Order);
pragma Warnings (Off, Default_Bit_Order); -- kill constant condition
warning

--  Priority-related Declarations (RM D.1)