public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/19183] New: GNAT -fPIC Bug
@ 2004-12-28 23:04 ddavenpo at ball dot com
  2004-12-28 23:50 ` [Bug ada/19183] " pinskia at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: ddavenpo at ball dot com @ 2004-12-28 23:04 UTC (permalink / raw)
  To: gcc-bugs

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


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

* [Bug ada/19183] GNAT -fPIC Bug
  2004-12-28 23:04 [Bug ada/19183] New: GNAT -fPIC Bug ddavenpo at ball dot com
@ 2004-12-28 23:50 ` pinskia at gcc dot gnu dot org
  2005-01-01 12:14 ` ebotcazou at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-28 23:50 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code


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


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

* [Bug ada/19183] GNAT -fPIC Bug
  2004-12-28 23:04 [Bug ada/19183] New: GNAT -fPIC Bug ddavenpo at ball dot com
  2004-12-28 23:50 ` [Bug ada/19183] " pinskia at gcc dot gnu dot org
@ 2005-01-01 12:14 ` ebotcazou at gcc dot gnu dot org
  2005-01-02 11:31 ` [Bug ada/19183] [3.4 Regression] ICE with -fPIC ebotcazou at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2005-01-01 12:14 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot gnu dot
                   |                            |org


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


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

* [Bug ada/19183] [3.4 Regression] ICE with -fPIC
  2004-12-28 23:04 [Bug ada/19183] New: GNAT -fPIC Bug ddavenpo at ball dot com
  2004-12-28 23:50 ` [Bug ada/19183] " pinskia at gcc dot gnu dot org
  2005-01-01 12:14 ` ebotcazou at gcc dot gnu dot org
@ 2005-01-02 11:31 ` ebotcazou at gcc dot gnu dot org
  2005-01-02 11:32 ` ebotcazou at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2005-01-02 11:31 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2005-01-02 11:30 -------
Confirmed, a regression from 3.3.2 present on 3.4 branch only.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
      Known to fail|                            |3.4.3 3.4.4
      Known to work|                            |3.3.2 4.0.0
   Last reconfirmed|0000-00-00 00:00:00         |2005-01-02 11:30:55
               date|                            |
            Summary|GNAT -fPIC Bug              |[3.4 Regression] ICE with -
                   |                            |fPIC
   Target Milestone|---                         |3.4.4


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


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

* [Bug ada/19183] [3.4 Regression] ICE with -fPIC
  2004-12-28 23:04 [Bug ada/19183] New: GNAT -fPIC Bug ddavenpo at ball dot com
                   ` (2 preceding siblings ...)
  2005-01-02 11:31 ` [Bug ada/19183] [3.4 Regression] ICE with -fPIC ebotcazou at gcc dot gnu dot org
@ 2005-01-02 11:32 ` ebotcazou at gcc dot gnu dot org
  2005-01-02 12:07 ` ebotcazou at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2005-01-02 11:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2005-01-02 11:32 -------
Investigating.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|ebotcazou at gcc dot gnu dot|
                   |org                         |
         AssignedTo|unassigned at gcc dot gnu   |ebotcazou at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED


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


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

* [Bug ada/19183] [3.4 Regression] ICE with -fPIC
  2004-12-28 23:04 [Bug ada/19183] New: GNAT -fPIC Bug ddavenpo at ball dot com
                   ` (3 preceding siblings ...)
  2005-01-02 11:32 ` ebotcazou at gcc dot gnu dot org
@ 2005-01-02 12:07 ` ebotcazou at gcc dot gnu dot org
  2005-01-18  8:43 ` ebotcazou at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2005-01-02 12:07 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2005-01-02 12:07 -------
The problem comes from the address representation clauses:

   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;

With -fPIC, the addresses are not compile-time constants anymore so the
elaboration must be performed slightly differently.


-- 


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


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

* [Bug ada/19183] [3.4 Regression] ICE with -fPIC
  2004-12-28 23:04 [Bug ada/19183] New: GNAT -fPIC Bug ddavenpo at ball dot com
                   ` (4 preceding siblings ...)
  2005-01-02 12:07 ` ebotcazou at gcc dot gnu dot org
@ 2005-01-18  8:43 ` ebotcazou at gcc dot gnu dot org
  2005-01-25 13:07 ` [Bug middle-end/19183] " ebotcazou at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2005-01-18  8:43 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P3


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


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

* [Bug middle-end/19183] [3.4 Regression] ICE with -fPIC
  2004-12-28 23:04 [Bug ada/19183] New: GNAT -fPIC Bug ddavenpo at ball dot com
                   ` (5 preceding siblings ...)
  2005-01-18  8:43 ` ebotcazou at gcc dot gnu dot org
@ 2005-01-25 13:07 ` ebotcazou at gcc dot gnu dot org
  2005-05-19 17:47 ` mmitchel at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2005-01-25 13:07 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2005-01-25 13:07 -------
Recategorizing.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|ada                         |middle-end


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


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

* [Bug middle-end/19183] [3.4 Regression] ICE with -fPIC
  2004-12-28 23:04 [Bug ada/19183] New: GNAT -fPIC Bug ddavenpo at ball dot com
                   ` (6 preceding siblings ...)
  2005-01-25 13:07 ` [Bug middle-end/19183] " ebotcazou at gcc dot gnu dot org
@ 2005-05-19 17:47 ` mmitchel at gcc dot gnu dot org
  2005-09-06  8:24 ` ebotcazou at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-05-19 17:47 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.4.4                       |3.4.5


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


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

* [Bug middle-end/19183] [3.4 Regression] ICE with -fPIC
  2004-12-28 23:04 [Bug ada/19183] New: GNAT -fPIC Bug ddavenpo at ball dot com
                   ` (7 preceding siblings ...)
  2005-05-19 17:47 ` mmitchel at gcc dot gnu dot org
@ 2005-09-06  8:24 ` ebotcazou at gcc dot gnu dot org
  2005-09-06 14:07 ` ddavenpo at ball dot com
  2005-09-06 15:53 ` ebotcazou at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2005-09-06  8:24 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2005-09-06 08:24 -------
Not really working on this.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot gnu dot
                   |                            |org
         AssignedTo|ebotcazou at gcc dot gnu dot|unassigned at gcc dot gnu
                   |org                         |dot org
             Status|ASSIGNED                    |NEW


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


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

* [Bug middle-end/19183] [3.4 Regression] ICE with -fPIC
  2004-12-28 23:04 [Bug ada/19183] New: GNAT -fPIC Bug ddavenpo at ball dot com
                   ` (8 preceding siblings ...)
  2005-09-06  8:24 ` ebotcazou at gcc dot gnu dot org
@ 2005-09-06 14:07 ` ddavenpo at ball dot com
  2005-09-06 15:53 ` ebotcazou at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: ddavenpo at ball dot com @ 2005-09-06 14:07 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ddavenpo at ball dot com  2005-09-06 14:07 -------
Subject: Re:  [3.4 Regression] ICE with -fPIC

No kidding.

On Sep 6, 2005, at 2:24 AM, ebotcazou at gcc dot gnu dot org wrote:

>
> ------- Additional Comments From ebotcazou at gcc dot gnu dot org   
> 2005-09-06 08:24 -------
> Not really working on this.
>
>
> --  
>            What    |Removed                     |Added
> ----------------------------------------------------------------------- 
> -----
>                  CC|                            |ebotcazou at gcc dot  
> gnu dot
>                    |                            |org
>          AssignedTo|ebotcazou at gcc dot gnu dot|unassigned at gcc dot  
> gnu
>                    |org                         |dot org
>              Status|ASSIGNED                    |NEW
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19183
>
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.



-- 


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


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

* [Bug middle-end/19183] [3.4 Regression] ICE with -fPIC
  2004-12-28 23:04 [Bug ada/19183] New: GNAT -fPIC Bug ddavenpo at ball dot com
                   ` (9 preceding siblings ...)
  2005-09-06 14:07 ` ddavenpo at ball dot com
@ 2005-09-06 15:53 ` ebotcazou at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2005-09-06 15:53 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2005-09-06 15:53 -------
> No kidding.

I guess you can probably refrain from posting such a comment.  I think it should
be possible to work around the problem by using renaming constructs.

-- 


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


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

end of thread, other threads:[~2005-09-06 15:53 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-28 23:04 [Bug ada/19183] New: GNAT -fPIC Bug ddavenpo at ball dot com
2004-12-28 23:50 ` [Bug ada/19183] " pinskia at gcc dot gnu dot org
2005-01-01 12:14 ` ebotcazou at gcc dot gnu dot org
2005-01-02 11:31 ` [Bug ada/19183] [3.4 Regression] ICE with -fPIC ebotcazou at gcc dot gnu dot org
2005-01-02 11:32 ` ebotcazou at gcc dot gnu dot org
2005-01-02 12:07 ` ebotcazou at gcc dot gnu dot org
2005-01-18  8:43 ` ebotcazou at gcc dot gnu dot org
2005-01-25 13:07 ` [Bug middle-end/19183] " ebotcazou at gcc dot gnu dot org
2005-05-19 17:47 ` mmitchel at gcc dot gnu dot org
2005-09-06  8:24 ` ebotcazou at gcc dot gnu dot org
2005-09-06 14:07 ` ddavenpo at ball dot com
2005-09-06 15:53 ` ebotcazou at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).