[Bug target/47500] -G0 option not recognized by gnat1

2011-09-05 Thread linux at schildmann dot info
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47500

Peter Schildmann  changed:

   What|Removed |Added

 CC||linux at schildmann dot
   ||info

--- Comment #6 from Peter Schildmann  2011-09-05 
19:45:27 UTC ---
diff --git a/gcc/ada/back_end.adb b/gcc/ada/back_end.adb
index 7172696..fdd06f1 100644
--- a/gcc/ada/back_end.adb
+++ b/gcc/ada/back_end.adb
@@ -206,6 +206,7 @@ package body Back_End is
  --  Skip -o or internal GCC switches together with their argument

  if Switch_Chars (First .. Last) = "o"
+   or else Switch_Chars (First .. Last) = "G"
or else Is_Internal_GCC_Switch (Switch_Chars)
  then
 Next_Arg := Next_Arg + 1;


[Bug target/10768] ICEs on compilation of ada support library for avr

2007-12-17 Thread linux at schildmann dot info


--- Comment #22 from linux at schildmann dot info  2007-12-17 19:53 ---
Hello,

when compiling the package

   package Integer_Test is
  type Int_Type is new Integer;
   end Integer_Test;

the ICE occures when the GNAT node that represents
the lower bound of the integer type is converted
to the corresponding INTERGER_CST node.

In the above case comp_type (gcc/ada/cuintp.c:87)
represents a signed integer type with 16 bit precision
which is to small for the computations performed later:

The call to build_cst_from_int (Base = 32768) at
line gcc/ada/cuintp.c:110

   gnu_base = build_cst_from_int (comp_type, Base);

returns an INTEGER_CST with the value -32768 which
causes an overflow (and later the ICE) in the call to

   fold_build2 (MULT_EXPR, comp_type,
gnu_ret, gnu_base)

at line gcc/ada/cuintp.c:116.

See patch below.

Peter

---

diff -Naur gcc-4.3-20071214.ORIG/gcc/ada/cuintp.c
gcc-4.3-20071214/gcc/ada/cuintp.c
--- gcc-4.3-20071214.ORIG/gcc/ada/cuintp.c  2007-09-03 12:06:52.0
+0200
+++ gcc-4.3-20071214/gcc/ada/cuintp.c   2007-12-15 19:33:37.0 +0100
@@ -104,8 +104,8 @@
 convert the final result back to the incoming type later on.  */

   if (TREE_CODE (comp_type) != REAL_TYPE
- && TYPE_PRECISION (comp_type) < TYPE_PRECISION (integer_type_node))
-   comp_type = integer_type_node;
+ && TYPE_PRECISION (comp_type) < TYPE_PRECISION
(long_integer_type_node))
+   comp_type = long_integer_type_node;

   gnu_base = build_cst_from_int (comp_type, Base);


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10768



[Bug ada/30501] New: GNAT BUG BOX: 16-bit target & Standard.Integer

2007-01-18 Thread linux at schildmann dot info
 --  Other System-Dependent Declarations

   type Bit_Order is (High_Order_First, Low_Order_First);
   Default_Bit_Order : constant Bit_Order :=
 Bit_Order'Val (Standard'Default_Bit_Order);

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

   Max_Priority   : constant Positive := 30;
   Max_Interrupt_Priority : constant Positive := 31;

   subtype Any_Priority   is Integer  range  0 .. 31;
   subtype Priority   is Any_Priority range  0 .. 30;
   subtype Interrupt_Priority is Any_Priority range 31 .. 31;

   Default_Priority : constant Priority := 15;

private

   type Address is mod Memory_Size;
   Null_Address : constant Address := 0;

   -
   -- System Implementation Parameters (see gcc/ada/targparm.ads) --
   -

   ---
   -- Run Time Name --
   ---

   Run_Time_Name : constant String := "M32C";

   ---
   -- Target Parameters --
   ---

   Compiler_System_Version   : constant Boolean := False;

   
   -- Special Target Control --
   

   AAMP  : constant Boolean := False;
   OpenVMS   : constant Boolean := False;

   ---
   -- Backend Arithmetic Checks --
   ---

   Backend_Divide_Checks : constant Boolean := False;
   Backend_Overflow_Checks   : constant Boolean := False;

   ---
   -- Control of Exception Handling --
   ---

   ZCX_By_Default: constant Boolean := True;
   GCC_ZCX_Support   : constant Boolean := True;

   
   -- Run-Time Library Configuration --
   

   Configurable_Run_Time : constant Boolean := True;
   Suppress_Standard_Library : constant Boolean := True;
   Preallocated_Stacks   : constant Boolean := True;

   -
   -- Duration Format --
   -

   Duration_32_Bits  : constant Boolean := False;

   
   -- Back-End Code Generation Flags --
   

   Support_64_Bit_Divides: constant Boolean := True;
   Support_Aggregates: constant Boolean := True;
   Support_Composite_Assign  : constant Boolean := True;
   Support_Composite_Compare : constant Boolean := True;
   Support_Long_Shifts   : constant Boolean := True;

   ---
   -- Control of Stack Checking --
   ---

   Stack_Check_Default   : constant Boolean := False;
   Stack_Check_Probes: constant Boolean := False;

   
   -- Command Line Arguments --
   

   Command_Line_Args : constant Boolean := False;
   Exit_Status_Supported : constant Boolean := False;

   ---
   -- Main Program Name --
   ---

   Use_Ada_Main_Program_Name : constant Boolean := False;

   --
   -- Boolean-Valued Floating-Point Attributes --
   --

   Denorm: constant Boolean := True;
   Machine_Overflows : constant Boolean := False;
   Machine_Rounds: constant Boolean := False;
   Signed_Zeros  : constant Boolean := True;

   ---
   -- Boolean-Valued Fixed-Point Attributes --
   ---

   Fractional_Fixed_Ops  : constant Boolean := False;

   --
   -- Handling of Unconstrained Values Returned from Functions --
   --
   --  Depressed Stack Pointer

   Functions_Return_By_DSP   : constant Boolean := False;

   -
   -- Data Layout --
   -

   Frontend_Layout   : constant Boolean := False;

end System;


-- 
   Summary: GNAT BUG BOX: 16-bit target & Standard.Integer
   Product: gcc
   Version: 4.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: linux at schildmann dot info


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30501