This error does not occur without the -fPIC option.

+===========================GNAT BUG DETECTED==============================+
| 3.4.2 (sparc-sun-solaris2.8) Constraint_Error SIGSEGV                    |
| Error detected at parm_tbl.ads:39:9                                      |
| Please submit a bug report; see http://gcc.gnu.org/bugs.html.            |
| Include the entire contents of this bug box in the report.               |
| Include the exact gcc or gnatmake command that you entered.              |
| Also include sources listed below in gnatchop format                     |
| (concatenated together with no headers between files).                   |
+==========================================================================+

33 % gcc -c -I../source/ -fPIC ../source/parm_tbl.ads
36 % gcc -v
Reading specs from /data/local/bin/../lib/gcc/sparc-sun-solaris2.8/3.4.2/specs
Configured with: /data/buildgcc/gcc-3.4.2/configure --enable-languages=ada,c,c++
Thread model: posix
gcc version 3.4.2

with Global_Defs;

package Parm_Tbl is

   CIDS : constant STRING := "$Id: parm_tbl.1.ada,v 1.3 04/21/2004 16:11:00 bill
Exp $";

   PARAMETER_TABLE_SIZE : constant := 10_000;

   subtype PARAMETER_TABLE_TYPE is
      Global_Defs.WORD_ARRAY( 0 .. PARAMETER_TABLE_SIZE - 1 );

   subtype PARAMETER_BYTES_TABLE_TYPE is
      Global_Defs.BYTE_ARRAY( 0 .. PARAMETER_TABLE_TYPE'Last *
Global_Defs.BYTES_PER_WORD );

   type FULL_PARAMETER_TABLE_TYPE is
      record
         Version  : Global_Defs.WORD32;
         Element  : PARAMETER_TABLE_TYPE;
   end record;

   Full_Parameter_Table : FULL_PARAMETER_TABLE_TYPE;

   Parameter_Table      : PARAMETER_TABLE_TYPE;
   for Parameter_Table'Address use Full_Parameter_Table.Element'Address;

   Parameter_Byte_Table : PARAMETER_BYTES_TABLE_TYPE;
   for Parameter_Byte_Table'Address use Parameter_Table'Address;

end Parm_Tbl;

with Interfaces;
with Ada.Numerics;
with System.Storage_Elements;

package Global_Defs is

   Id : constant String :=
      "$Id: global_defs.1.ada,v 1.6 11/17/2003 22:44:43 jeff Exp $";

   --*****************************************************************
   -- Type declarations
   --*****************************************************************

   -- Floating Point

   subtype REAL32 is FLOAT;
   subtype REAL is LONG_FLOAT;

   -- Signed Integer

   subtype INT16 is Interfaces.INTEGER_16;
   subtype INT32 is Interfaces.INTEGER_32;

   -- Unsigned Integer

   BYTE_SIZE : constant := 8;                    -- in bits

   WORD_SIZE : constant := 2 * BYTE_SIZE;         -- in bits

   WORD32_SIZE : constant := 4 * BYTE_SIZE;         -- in bits

   BYTES_PER_WORD32 : constant := WORD32_SIZE / BYTE_SIZE;

   BYTES_PER_WORD : constant := WORD_SIZE / BYTE_SIZE;

   WORDS_PER_WORD32 : constant := WORD32_SIZE / WORD_SIZE;

   type BYTE is new Interfaces.UNSIGNED_8;

   type WORD is new Interfaces.UNSIGNED_16;

   type WORD32 is new Interfaces.UNSIGNED_32;

   type BYTE_PTR is access BYTE;

   type WORD_PTR is access WORD;

   type WORD32_PTR is access WORD32;

   type BYTE_ARRAY is array (NATURAL range <>) of BYTE;
   pragma Pack (BYTE_ARRAY);

   type WORD_ARRAY is array (NATURAL range <>) of WORD;
   pragma Pack (WORD_ARRAY);

   type WORD32_ARRAY is array (NATURAL range <>) of WORD32;
   pragma Pack (WORD32_ARRAY);

   -- Misc. enumeration types
   type USABILITY_TYPE is (Good, Coarse, Bad);
   for USABILITY_TYPE use (Good => 0, Coarse => 1, Bad => 2);

   type STORAGE_BYTE_ARRAY is new System.Storage_Elements.STORAGE_ARRAY;
   pragma Pack (STORAGE_BYTE_ARRAY);

   type BIT32 is mod 2 ** 5;

   type BIT32_ARRAY is array (BIT32'Range) of BOOLEAN;
   pragma Pack (BIT32_ARRAY);
   for BIT32_ARRAY'Size use WORD32_SIZE;

   -- units

   subtype RADIANS is REAL;
   subtype RAD_CYCLE is REAL;       -- radians/cycle
   subtype RAD_CYCLE_RAD is REAL;   -- radians/cycle/radian
   subtype RAD_CYCLE_SQ is REAL;    -- radians/cycle**2
   subtype RAD_SEC is REAL;         -- radians/second
   subtype RAD_SEC_SQ is REAL;      -- radians/second**2

   subtype DEGREES is REAL;

   subtype KGM_SQ is REAL;              -- kilograms**2

   subtype KILOMETERS is REAL;
   subtype KM_SQ is REAL;               -- kilometers**2
   subtype KILOMETERS_PER_SECOND is REAL;
   subtype KILOMETERS_PER_SECOND_SQ is REAL;  -- km/sec**2

   subtype METERS is REAL;

   subtype NM is REAL;        -- Newton x meters (measure of torque)
   subtype NMS is REAL;       -- Newtons x meters x seconds

   subtype RPM is REAL;               -- revolutions per minute


   --*****************************************************************
   --*****************************************************************
   -- Constant definitions
   --*****************************************************************
   --*****************************************************************

   PI : constant REAL := Ada.Numerics.PI;
   TWO_PI : constant REAL := 2.0 * PI;
   HALF_PI : constant REAL := PI / 2.0;

   DEGREES_TO_RADIANS : constant REAL := PI / 180.0;
   RADIANS_TO_DEGREES : constant REAL := 180.0 / PI;

   METERS_TO_KM : constant REAL := 0.001;
   KM_TO_METERS : constant REAL := 1000.0;


end Global_Defs;

-- 
           Summary: GNAT -fPIC Bug
           Product: gcc
           Version: 3.4.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: ada
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ddavenpo at ball dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: 3.4.2
  GCC host triplet: sparc-sun-solaris2.8
GCC target triplet: sparc-sun-solaris2.8


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

Reply via email to